mirror of
https://github.com/vrana/adminer.git
synced 2025-08-22 14:12:51 +02:00
PHP 8.3 error suppression
PHP 8.3 has shortened the array access on null error message to "Trying to access array offset on null". This commit changes the regular expression used to circumvent errors.
This commit is contained in:
@@ -1,2 +1,9 @@
|
||||
<?php
|
||||
$VERSION = "4.9.1-dev";
|
||||
|
||||
function adminer_errors($errno, $errstr) {
|
||||
return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined array key)~', $errstr);
|
||||
}
|
||||
|
||||
error_reporting(6135); // errors and warnings
|
||||
set_error_handler('adminer_errors', E_WARNING);
|
||||
|
Reference in New Issue
Block a user