]> git.joonet.de Git - adminer.git/commitdiff
Use anonymous function
authorJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 16:08:29 +0000 (17:08 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 5 Mar 2025 16:08:29 +0000 (17:08 +0100)
adminer/include/errors.inc.php

index aca1137033eeeed1987220508c72124ff24e185d..84cb52c9ce57d5e0a2dbf43ab178889c8c8ed2b7 100644 (file)
@@ -1,9 +1,7 @@
 <?php
 namespace Adminer;
 
-function adminer_errors($errno, $errstr) {
-       return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined (array key|property))~', $errstr);
-}
-
 error_reporting(6135); // errors and warnings
-set_error_handler('Adminer\adminer_errors', E_WARNING);
+set_error_handler(function ($errno, $errstr) {
+       return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined (array key|property))~', $errstr);
+}, E_WARNING);