summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/index.php b/index.php
index ebf1667e6..a88fcb21e 100644
--- a/index.php
+++ b/index.php
@@ -297,6 +297,14 @@ function check_for_fatal()
}
register_shutdown_function("check_for_fatal");
+function _assert_failure($file, $line, $expr, $message = "")
+{
+ _actual_exception_handler(new Exception("assert($expr): Assertion failed in $file at line $line".($message != "" ? " with message: '$message'" : "")));
+ exit(1);
+}
+
+assert_options(ASSERT_ACTIVE, true);
+assert_options(ASSERT_CALLBACK, '_assert_failure');
/*
* --------------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE