Source: adminer
Version: 4.8.1-1
Severity: normal
Tags: patch
X-Debbugs-Cc: athos.ribe...@canonical.com

Dear Maintainer,

adminer currently raises the following warning when ran with php8.3
(experimental):
  PHP Warning:  Trying to access array offset on null in 
/usr/share/adminer/adminer/include/design.inc.php on line 162

Since this is printed in stderr, the DEP8 tests for the package will
fail.

There is a PR open in the upstream project at
https://github.com/vrana/adminer/pull/484 which should address the
issue.

I am attaching it here.
>From 244aa0c1e6d443e00664dd97dc79a0a62918534d Mon Sep 17 00:00:00 2001
From: Sneda8 <85223444+sne...@users.noreply.github.com>
Date: Sun, 17 Dec 2023 01:36:25 +0100
Subject: [PATCH] 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.

Origin: other, 
https://github.com/vrana/adminer/pull/484/commits/244aa0c1e6d443e00664dd97dc79a0a62918534d
Forwarded: https://github.com/vrana/adminer/pull/484
Last-Update: 2024-01-26
---
 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

Reply via email to