mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Send a 500 error response code when thumb.php fails due to an exception.
This commit is contained in:
parent
55be7e35a2
commit
eef624c93b
@ -26,6 +26,13 @@ define('e107_INIT', true);
|
|||||||
|
|
||||||
// error_reporting(E_ALL);
|
// error_reporting(E_ALL);
|
||||||
|
|
||||||
|
function thumbErrorHandler()
|
||||||
|
{
|
||||||
|
echo "Fatal Thumbnail Error";
|
||||||
|
http_response_code(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_exception_handler('thumbErrorHandler'); // disable to troubleshoot.
|
||||||
|
|
||||||
|
|
||||||
error_reporting(0); // suppress all errors or image will be corrupted.
|
error_reporting(0); // suppress all errors or image will be corrupted.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user