From 244aa0c1e6d443e00664dd97dc79a0a62918534d Mon Sep 17 00:00:00 2001
From: Sneda8 <85223444+Sneda8@users.noreply.github.com>
Date: Sun, 17 Dec 2023 01:36:25 +0100
Subject: [PATCH] PHP 8.3 error suppression
Forwarded: https://github.com/vrana/adminer/pull/484

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.
---
 adminer/include/bootstrap.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/adminer/include/bootstrap.inc.php b/adminer/include/bootstrap.inc.php
index 8eaff3991..f18b1f7fc 100644
--- a/adminer/include/bootstrap.inc.php
+++ b/adminer/include/bootstrap.inc.php
@@ -1,6 +1,6 @@
 <?php
 function adminer_errors($errno, $errstr) {
-	return !!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~', $errstr);
+	return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined array key)~', $errstr);
 }
 
 error_reporting(6135); // errors and warnings
