assert_options is deprecated for php7

This commit is contained in:
Shish 2019-06-13 16:57:58 +01:00
parent 10d8b352c1
commit 1d1536b1ee
2 changed files with 0 additions and 18 deletions

View file

@ -56,8 +56,6 @@ date_default_timezone_set('UTC');
</div> </div>
<pre style="display:none"> <pre style="display:none">
<?php } <?php }
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_BAIL, 1);
// Pull in necessary files // Pull in necessary files
require_once "core/exceptions.php"; require_once "core/exceptions.php";

View file

@ -351,17 +351,6 @@ function log_slow(): void
} }
} }
function score_assert_handler($file, $line, $code, $desc = null): void
{
$file = basename($file);
print("Assertion failed at $file:$line: $code ($desc)");
/*
print("<pre>");
debug_print_backtrace();
print("</pre>");
*/
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
* Request initialisation stuff * * Request initialisation stuff *
@ -396,11 +385,6 @@ function _sanitise_environment(): void
ini_set('assert.exception', 1); // throw exceptions when failed ini_set('assert.exception', 1); // throw exceptions when failed
if (DEBUG) { if (DEBUG) {
error_reporting(E_ALL); error_reporting(E_ALL);
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_BAIL, 1);
assert_options(ASSERT_WARNING, 0);
assert_options(ASSERT_QUIET_EVAL, 1);
assert_options(ASSERT_CALLBACK, 'score_assert_handler');
} }
$_shm_ctx = new Context(); $_shm_ctx = new Context();