1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-07 15:16:44 +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:
Sneda8
2023-12-17 01:36:25 +01:00
committed by Jakub Vrana
parent fdeb9557cd
commit b6f9f58712
4 changed files with 11 additions and 14 deletions

View File

@@ -1,11 +1,5 @@
<?php
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);
include "../adminer/include/version.inc.php";
include "../adminer/include/coverage.inc.php";
// disable filter.default
@@ -108,7 +102,6 @@ define("ME", preg_replace('~\?.*~', '', relative_uri()) . '?'
. (DB != "" ? 'db=' . urlencode(DB) . '&' . (isset($_GET["ns"]) ? "ns=" . urlencode($_GET["ns"]) . "&" : "") : '')
);
include "../adminer/include/version.inc.php";
include "../adminer/include/design.inc.php";
include "../adminer/include/xxtea.inc.php";
include "../adminer/include/auth.inc.php";

View File

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

View File

@@ -1,3 +1,6 @@
Adminer 4.9.1-dev:
Support PHP 8.3
Adminer 4.9.0:
Validate connection to server in HTTP based drivers
Elasticsearch 5: Make unusable driver usable again, move it to plugins

View File

@@ -1,11 +1,5 @@
#!/usr/bin/env php
<?php
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);
include dirname(__FILE__) . "/adminer/include/version.inc.php";
include dirname(__FILE__) . "/externals/JsShrink/jsShrink.php";