1
0
Fork 0

Add workaround for PHP bug #61336

pull/421/merge
Jordi Boggiano 2012-03-09 23:44:10 +01:00
parent 142d5785f4
commit a4f9e03d35
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,11 @@ class RemoteFilesystem
$result = @file_get_contents($fileUrl, false, $ctx);
}
// fix for 5.4.0 https://bugs.php.net/bug.php?id=61336
if (!empty($http_response_header[0]) && preg_match('{^HTTP/\S+ 404}i', $http_response_header[0])) {
$result = false;
}
// avoid overriding if content was loaded by a sub-call to get()
if (null === $this->result) {
$this->result = $result;