1
0
Fork 0

Merge pull request #8252 from ScullWM/error_handler_signature

Fix error_handler return type declaration
pull/8257/head
Jordi Boggiano 2019-07-31 14:51:18 +02:00 committed by GitHub
commit c51e52a142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class ErrorHandler
* *
* @static * @static
* @throws \ErrorException * @throws \ErrorException
* @return bool
*/ */
public static function handle($level, $message, $file, $line) public static function handle($level, $message, $file, $line)
{ {
@ -63,6 +64,8 @@ class ErrorHandler
}, array_slice(debug_backtrace(), 2)))); }, array_slice(debug_backtrace(), 2))));
} }
} }
return true;
} }
/** /**

View File

@ -321,6 +321,8 @@ class RemoteFilesystem
$errorMessage .= "\n"; $errorMessage .= "\n";
} }
$errorMessage .= preg_replace('{^file_get_contents\(.*?\): }', '', $msg); $errorMessage .= preg_replace('{^file_get_contents\(.*?\): }', '', $msg);
return true;
}); });
try { try {
$result = $this->getRemoteContents($originUrl, $fileUrl, $ctx, $http_response_header); $result = $this->getRemoteContents($originUrl, $fileUrl, $ctx, $http_response_header);
@ -494,6 +496,8 @@ class RemoteFilesystem
$errorMessage .= "\n"; $errorMessage .= "\n";
} }
$errorMessage .= preg_replace('{^file_put_contents\(.*?\): }', '', $msg); $errorMessage .= preg_replace('{^file_put_contents\(.*?\): }', '', $msg);
return true;
}); });
$result = (bool) file_put_contents($fileName, $result); $result = (bool) file_put_contents($fileName, $result);
restore_error_handler(); restore_error_handler();