Skip to content

Commit

Permalink
Throw E_USER_NOTICE instead of E_USER_ERROR
Browse files Browse the repository at this point in the history
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 symphonycms#166
  • Loading branch information
michael-e committed Feb 28, 2019
1 parent 829183f commit 2911aef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2911aef

Please sign in to comment.