summaryrefslogtreecommitdiffstats
path: root/appinfo/app.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-24 09:04:09 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-24 09:04:36 +0200
commit514b340fda944e288facab6799ba5c67056c2501 (patch)
tree11b96dc99680b1eec4f49d95aaa06c7c313f6d0c /appinfo/app.php
parent3592bcb326e80946d1578dcaa86533ec24f9f949 (diff)
only register error handler once
Diffstat (limited to 'appinfo/app.php')
-rw-r--r--appinfo/app.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 77e3fe19d..98c033124 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -19,6 +19,12 @@ use \OCA\News\Config\DependencyException;
require_once __DIR__ . '/setup.php';
if (is_setup()) {
+ // Turn all errors into exceptions to combat shitty library behavior
+ set_error_handler(function ($code, $message) {
+ if ($code === E_ERROR || $code === E_USER_ERROR) {
+ throw new \Exception($message, $code);
+ }
+ });
$container = new Application();