From 2911aef0dde3b4a985788ae046dc4217ac555717 Mon Sep 17 00:00:00 2001 From: michael-e Date: Thu, 28 Feb 2019 16:38:00 +0100 Subject: [PATCH] Throw E_USER_NOTICE instead of E_USER_ERROR When an image can not be loaded, a E_USER_ERROR is thrown. But Symphony's 404 errors, for example, trigger E_USER_NOTICE exceptions. So the latter should be enough here as well. This will allow to run big systems with suppressed notices, thus preventing the log file from being polluted with image errors (mainly caused by robots anyway). Fixes #166 --- lib/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/image.php b/lib/image.php index c89abe8..de563e7 100755 --- a/lib/image.php +++ b/lib/image.php @@ -348,7 +348,7 @@ function __errorHandler($errno=NULL, $errstr, $errfile=NULL, $errline=NULL, $err } catch(Exception $e){ Page::renderStatusCode(Page::HTTP_STATUS_BAD_REQUEST); - trigger_error($e->getMessage(), E_USER_ERROR); + trigger_error($e->getMessage(), E_USER_NOTICE); echo $e->getMessage(); exit; }