From 00a9ae11487d2b7509b1910378d80b932f94cfeb Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Sun, 3 Mar 2024 19:46:34 +0100 Subject: [PATCH] Restored compatibility with PHP 5.6 --- adminer/drivers/mysql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index 9d0d3c6b..02a42a67 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -1101,13 +1101,13 @@ if (!defined("DRIVER")) { * @return string */ function unconvert_field($field, $return) { - if (preg_match("~binary~", $field["type"] ?? null)) { + if (preg_match("~binary~", isset($field["type"]) ? $field["type"] : null)) { $return = "UNHEX($return)"; } if (isset($field["type"]) && $field["type"] == "bit") { $return = "CONV($return, 2, 10) + 0"; } - if (preg_match("~geometry|point|linestring|polygon~", $field["type"] ?? null)) { + if (preg_match("~geometry|point|linestring|polygon~", isset($field["type"]) ? $field["type"] : null)) { $prefix = (min_version(8) ? "ST_" : ""); $return = $prefix . "GeomFromText($return, $prefix" . "SRID($field[field]))"; }