Record_log improve record exception and previous ones

This commit is contained in:
sparkyx 2025-02-21 01:14:25 +01:00
parent fde7d62ac9
commit 47adc3b0c1
3 changed files with 83 additions and 20 deletions

View file

@ -65,19 +65,22 @@ if (!file_exists('authorized_debug'))
}
define('ALLOWED', 1);
load_all_script();
// To enable assert , set "zend.assertions" in the php.ini file
ini_set("assert.active",1);
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_WARNING, 1);
// deprecated PHP8.3
//ini_set("assert.active",1);
//assert_options(ASSERT_ACTIVE, 1);
//assert_options(ASSERT_WARNING, 1);
//removed in PHP8 assert_options(ASSERT_QUIET_EVAL, 1);
function my_assert_handler($file, $line, $code)
{
echo "<hr>Assert Failed :
File '$file'<br />
Line '$line'<br />
Code '$code'<br /><hr />";
}
assert_options(ASSERT_CALLBACK, 'my_assert_handler');
//
//function my_assert_handler($file, $line, $code)
//{
// echo "<hr>Assert Failed :
// File '$file'<br />
// Line '$line'<br />
// Code '$code'<br /><hr />";
//}
//assert_options(ASSERT_CALLBACK, 'my_assert_handler');
/******************************************************************************************************************/
/* Utilities
/******************************************************************************************************************/