Permalink
Browse files

Avoid fatal error (bug #3110257)

  • Loading branch information...
1 parent 1d47454 commit e26b1864e354a4f66bf5f15e15c695bf14b73fe8 @vrana committed Jan 31, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 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;
}

0 comments on commit e26b186

Please sign in to comment.