File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 10
10
use function explode ;
11
11
use function function_exists ;
12
12
use function gettype ;
13
+ use function gzdecode ;
13
14
use function gzinflate ;
14
15
use function gzuncompress ;
15
16
use function hexdec ;
@@ -586,7 +587,7 @@ protected function decodeChunkedBody($body)
586
587
*/
587
588
protected function decodeGzip ($ body )
588
589
{
589
- if (! function_exists ('gzinflate ' )) {
590
+ if (! function_exists ('gzdecode ' )) {
590
591
throw new Exception \RuntimeException (
591
592
'zlib extension is required in order to decode "gzip" encoding '
592
593
);
@@ -601,7 +602,7 @@ protected function decodeGzip($body)
601
602
}
602
603
603
604
ErrorHandler::start ();
604
- $ return = gzinflate ( substr ( $ body, 10 ) );
605
+ $ return = gzdecode ( $ body );
605
606
$ test = ErrorHandler::stop ();
606
607
if ($ test ) {
607
608
throw new Exception \RuntimeException (
You can’t perform that action at this time.
0 commit comments