mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 11:04:02 +02:00
Use anonymous function
This commit is contained in:
@@ -1,9 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Adminer;
|
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
|
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);
|
||||||
|
Reference in New Issue
Block a user