1
0
Fork 0

Avoid using null value as string, fixes #6134

pull/6174/merge
Jordi Boggiano 2017-03-06 12:08:51 +01:00
parent 9be13783a3
commit 08fc56b38a
1 changed files with 3 additions and 2 deletions

View File

@ -348,7 +348,7 @@ class RemoteFilesystem
if ($originUrl === 'bitbucket.org'
&& !$this->isPublicBitBucketDownload($fileUrl)
&& substr($fileUrl, -4) === '.zip'
&& preg_match('{^text/html\b}i', $contentType)
&& $contentType && preg_match('{^text/html\b}i', $contentType)
) {
$result = false;
if ($this->retryAuthFailure) {
@ -385,7 +385,8 @@ class RemoteFilesystem
// decode gzip
if ($result && extension_loaded('zlib') && substr($fileUrl, 0, 4) === 'http' && !$hasFollowedRedirect) {
$decode = 'gzip' === strtolower($this->findHeaderValue($http_response_header, 'content-encoding'));
$contentEncoding = $this->findHeaderValue($http_response_header, 'content-encoding');
$decode = $contentEncoding && 'gzip' === strtolower($contentEncoding);
if ($decode) {
try {