From f22e16c9198b2baa78bfa6c2bcbef59c0b12a7d6 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 13 Jan 2009 14:45:01 +0000 Subject: [PATCH] Table list can be empty (bug #2504446) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@546 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- dump.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dump.inc.php b/dump.inc.php index ed6afc16..a07e3a0d 100644 --- a/dump.inc.php +++ b/dump.inc.php @@ -10,7 +10,7 @@ function tar_file($filename, $contents) { } if ($_POST) { - $ext = dump_headers((strlen($_GET["dump"]) ? $_GET["dump"] : $_GET["db"]), (!strlen($_GET["db"]) || count(array_filter($_POST["tables"]) + array_filter($_POST["data"])) > 1)); + $ext = dump_headers((strlen($_GET["dump"]) ? $_GET["dump"] : $_GET["db"]), (!strlen($_GET["db"]) || count(array_filter((array) $_POST["tables"]) + array_filter((array) $_POST["data"])) > 1)); if ($_POST["format"] != "csv") { $max_packet = 16777216; echo "SET NAMES utf8;\n"; @@ -53,7 +53,7 @@ if ($_POST) { echo ($out ? "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n" : ""); } - if (($style || strlen($_GET["db"])) && (array_filter($_POST["tables"]) || array_filter($_POST["data"]))) { + if (($style || strlen($_GET["db"])) && (array_filter((array) $_POST["tables"]) || array_filter((array) $_POST["data"]))) { $views = array(); $result = $mysql->query("SHOW TABLE STATUS"); while ($row = $result->fetch_assoc()) {