2024-10-17 00:24:53 +02:00
|
|
|
<?php
|
2025-03-05 11:28:53 +01:00
|
|
|
namespace Adminer;
|
|
|
|
|
|
2025-03-23 22:11:05 +01:00
|
|
|
error_reporting(24575); // all but E_DEPRECATED (overriding mysqli methods without types is deprecated)
|
2025-03-05 17:08:29 +01:00
|
|
|
set_error_handler(function ($errno, $errstr) {
|
2025-03-24 07:25:17 +01:00
|
|
|
// "Undefined array key" mutes $_GET["q"] if there's no ?q=
|
|
|
|
|
// "Undefined offset" and "Undefined index" are older messages for the same thing
|
2025-03-29 23:20:05 +01:00
|
|
|
return !!preg_match('~^Undefined (array key|offset|index)~', $errstr);
|
2025-03-23 22:11:05 +01:00
|
|
|
}, E_WARNING | E_NOTICE); // warning since PHP 8.0
|