From e78a21015b46a98fb6e20497e05daab1a9547763 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 30 Apr 2013 10:06:39 +0200 Subject: [PATCH] Dont try to gzip decode empty responses, refs #1846 --- src/Composer/Util/RemoteFilesystem.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 5d07aaeda..55b0c84bb 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -145,7 +145,7 @@ class RemoteFilesystem } // decode gzip - if (false !== $result && extension_loaded('zlib') && substr($fileUrl, 0, 4) === 'http') { + if ($result && extension_loaded('zlib') && substr($fileUrl, 0, 4) === 'http') { $decode = false; foreach ($http_response_header as $header) { if (preg_match('{^content-encoding: *gzip *$}i', $header)) {