diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-08-02 16:34:12 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-08-02 16:39:55 +0200 |
commit | 81202ecf82132e3294141a49c9dddd1f5b852c04 (patch) | |
tree | 0fafd912569d5fb609c3cfcb15141b364d0b1f3d /public_html/index.php | |
parent | 2d1862be2d5c172816dfb66f3eb110419d0186c8 (diff) |
Fix handling of php errors
When the exception handler moved to a dedicated class
_exception_handler was no longer defined so CI defined it with it's own
code which does not throw an exception but rather just prints the less
helpful CI error page.
This could be triggered by deleting an upload while the cache_backend
is set to "file" and the cache does not hold the filedata for the
upload being deleted. In that case PHP throws a warning (unlink on a
missing file) which would no longer be caught with try/catch in the
cache backend's delete() function. Now the error is catchable again.
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'public_html/index.php')
-rw-r--r-- | public_html/index.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/public_html/index.php b/public_html/index.php index 71d283abb..f0c099478 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -202,6 +202,11 @@ if (false && defined('ENVIRONMENT')) require APPPATH.'libraries/ExceptionHandler.php'; \libraries\ExceptionHandler::setup(); +// wrapper for CI so that it calls our handler rather than it's own +function _exception_handler($severity, $message, $filepath, $line) { + return \libraries\ExceptionHandler::error_handler($severity, $message, $filepath, $line); +} + /* * -------------------------------------------------------------------- * LOAD THE BOOTSTRAP FILE |