From: Mischa POSLAWSKY Date: Wed, 13 Sep 2017 15:16:03 +0000 (+0200) Subject: page: return 500 status and page on php exceptions X-Git-Tag: v2.1~12 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/d25b72d1e59591449d5efeea4b4063d250ebb1a8 page: return 500 status and page on php exceptions Significantly catch syntax errors in editor saves. --- diff --git a/500.php b/500.php new file mode 100644 index 0000000..a3e261c --- /dev/null +++ b/500.php @@ -0,0 +1,8 @@ + +

Scriptfout

+ +

Er ging iets mis:

+Waarschijnlijk wordt hier aan gewerkt, maar als het probleem aanhoudt +geef het dan aan ons door. diff --git a/page.php b/page.php index f6c2346..9acacc2 100644 --- a/page.php +++ b/page.php @@ -2,6 +2,11 @@ error_reporting(E_ALL); ini_set('display_errors', TRUE); +set_exception_handler(function ($error) { + include_once 'page.inc.php'; + include_once '500.php'; +}); + include_once 'auth.inc.php'; $Edit = isset($_GET['edit']);