Bug 285982 - databases/adminer: Update 4.8.1 → 5.2.0
Summary: databases/adminer: Update 4.8.1 → 5.2.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Zsolt Udvari
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-09 11:34 UTC by Deividas Gedgaudas
Modified: 2025-04-10 07:31 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (uzsolt)


Attachments
adminer v4.8.1 to v5.2.0 update diff (867 bytes, patch)
2025-04-09 11:34 UTC, Deividas Gedgaudas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Deividas Gedgaudas 2025-04-09 11:34:06 UTC
Created attachment 259410 [details]
adminer v4.8.1 to v5.2.0 update diff

Current upstream version of adminer is 5.2.0 which was tested and working with php83.

Adminer version 4.8.1 has a defect related to `Warning: Trying to access array offset on null in /usr/local/www/adminer/index.php on line 1452` with php versions 82+ which makes adminer unusable at this moment.

If version upgrade is not possible - adminer-4.8.1 needs to be patched:

		diff --git a/adminer-4.8.1.php b/adminer-4.8.1.php.fix
		index 762aaaf..7a0fe5e 100644
		--- a/adminer-4.8.1.php
		+++ b/adminer-4.8.1.php.fix
		@@ -7,7 +7,7 @@
		* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
		* @version 4.8.1
		*/function
		-adminer_errors($Cc,$Ec){return!!preg_match('~^(Trying to access array offset on value of type null|Undefined array key)~',$Ec);}error_reporting(6135);set_error_handler('adminer_errors',E_WARNING);$ad=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($ad||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Ii=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Ii)$$X=$Ii;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");function
		+adminer_errors($Cc,$Ec){return!!preg_match('~^(Trying to access array offset on null|Undefined array key)~',$Ec);}error_reporting(6135);set_error_handler('adminer_errors',E_WARNING);$ad=!preg_match('~^(unsafe_raw)?$~',ini_get("filter.default"));if($ad||ini_get("filter.default_flags")){foreach(array('_GET','_POST','_COOKIE','_SERVER')as$X){$Ii=filter_input_array(constant("INPUT$X"),FILTER_UNSAFE_RAW);if($Ii)$$X=$Ii;}}if(function_exists("mb_internal_encoding"))mb_internal_encoding("8bit");function
		connection(){global$g;return$g;}function
		adminer(){global$b;return$b;}function
		version(){global$ia;return$ia;}function
Comment 1 Zsolt Udvari freebsd_committer freebsd_triage 2025-04-10 07:30:42 UTC
Thanks Delvidas for your work, committed!
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-04-10 07:31:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6aa42234727894eabee31d4ab35724dda000bb25

commit 6aa42234727894eabee31d4ab35724dda000bb25
Author:     Deividas Gedgaudas <sidicer@gmail.com>
AuthorDate: 2025-04-10 07:29:35 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2025-04-10 07:30:20 +0000

    databases/adminer: Update to 5.2.0

    Switch to DISTVERSION.
    Pet portfmt.
    PR:             285982

 databases/adminer/Makefile | 5 +++--
 databases/adminer/distinfo | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)