Diff of /adminer/edit.inc.php [f301fc] .. [4bab88] Maximize Restore

  Switch to side-by-side view

--- a/adminer/edit.inc.php
+++ b/adminer/edit.inc.php
@@ -100,8 +100,13 @@
 if (!support("table") && !$fields) {
 	$id = ($jush == "mongo" ? "_id" : "itemName()"); // simpledb
 	if (!$where) { // insert
-		$row = $driver->select($TABLE, array("*"), $where, array("*"), array(), 1, 0);
-		$row = ($row ? $row->fetch_assoc() : array($id => ""));
+		$result = $driver->select($TABLE, array("*"), $where, array("*"), array(), 1, 0);
+		if ($result) {
+			$row = $result->fetch_assoc();
+		}
+		if (!$row) {
+			$row = array($id => "");
+		}
 	}
 	if ($row) {
 		foreach ($row as $key => $val) {