1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

Use anonymous function

This commit is contained in:
Jakub Vrana
2025-03-05 17:08:29 +01:00
parent e8d9a126be
commit f5d47d46a0

View 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);