diff -u b/core/includes/bootstrap.inc b/core/includes/bootstrap.inc --- b/core/includes/bootstrap.inc +++ b/core/includes/bootstrap.inc @@ -1134,11 +1134,11 @@ return; } - // In PHP 7, just make sure assert failures are thrown. + // In PHP 7, we just make sure assert failures are thrown as exceptions. if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) { assert_options(ASSERT_EXCEPTION, 1); } - // In PHP 5, and establish an assert callback handle that will throw AssertionErrors. + // In PHP 5, we establish an assert callback handle that will throw AssertionErrors. elseif (assert_options(ASSERT_CALLBACK) === NULL) { class AssertionError extends Exception { public function __construct($message, $code = 0, Exception $previous = NULL, $file, $line) { @@ -1150,6 +1150,7 @@ } assert_options(ASSERT_CALLBACK, function($file, $line, $code, $message = '') { + // Use the same message as PHP 7 AssertionErrors. if (empty($message)) { $message = $code; }