]> git.joonet.de Git - adminer.git/commitdiff
MySQLi: Avoid using PHP 8.1 method
authorJakub Vrana <jakub@vrana.cz>
Sun, 23 Mar 2025 11:37:11 +0000 (12:37 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 23 Mar 2025 11:40:12 +0000 (12:40 +0100)
This reverts 359fdf3.

adminer/drivers/mysql.inc.php

index b95fb8862227d5a32834ef0029e0871e95b49372..e4389aa87d45dbc15074b15456f738f3d21a83b6 100644 (file)
@@ -47,7 +47,11 @@ if (!defined('Adminer\DRIVER')) {
 
                        function result($query, $field = 0) {
                                $result = $this->query($query);
-                               return ($result ? $result->fetch_column($field) : false);
+                               if (!$result) {
+                                       return false;
+                               }
+                               $row = $result->fetch_array();
+                               return ($row ? $row[$field] : false);
                        }
 
                        function quote($string) {