diff --git a/functions.php b/functions.php index ab047e0..22cae95 100644 --- a/functions.php +++ b/functions.php @@ -67,22 +67,6 @@ function errorPage($msg, $type = 500) -/** - * Custom exception handler. - */ -set_exception_handler(function ($exception) { - errorPage( - "

img.php: Uncaught exception:

" - . $exception->getMessage() - . "

"
-        . $exception->getTraceAsString()
-        . "
", - 500 - ); -}); - - - /** * Get input from query string or return default value if not set. * diff --git a/webroot/img.php b/webroot/img.php index f93227e..03b09f6 100644 --- a/webroot/img.php +++ b/webroot/img.php @@ -8,6 +8,22 @@ * */ +/** + * Custom exception handler. + */ +set_exception_handler(function ($exception) { + errorPage( + "

img.php: Uncaught exception:

" + . $exception->getMessage() + . "

"
+        . $exception->getTraceAsString()
+        . "
", + 500 + ); +}); + + + /** * Get configuration options from file, if the file exists, else use $config * if its defined or create an empty $config.