From e26b1864e354a4f66bf5f15e15c695bf14b73fe8 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 31 Jan 2011 15:49:07 +0100 Subject: [PATCH] Avoid fatal error (bug #3110257) --- adminer/include/functions.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index edb426ec..aff62aac 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -210,8 +210,10 @@ function get_key_vals($query, $connection2 = null) { } $return = array(); $result = $connection2->query($query); - while ($row = $result->fetch_row()) { - $return[$row[0]] = $row[1]; + if (is_object($result)) { + while ($row = $result->fetch_row()) { + $return[$row[0]] = $row[1]; + } } return $return; }