1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Send a 500 error response code when thumb.php fails due to an exception.

This commit is contained in:
Cameron 2018-07-21 13:07:44 -07:00
parent 55be7e35a2
commit eef624c93b

View File

@ -26,6 +26,13 @@ define('e107_INIT', true);
// 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.