From: jakubvrana Date: Mon, 15 Jun 2009 09:32:29 +0000 (+0000) Subject: Test for empty history X-Git-Tag: v3.0.0~833 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=b5fa22e0abbc8b286689cef0fe603e535ed0c657;p=adminer.git Test for empty history git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@692 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 1eca30b9..cd4efe82 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -6,7 +6,7 @@ if (!$error && $_POST) { if (is_string($query = (isset($_POST["file"]) ? get_file("sql_file") : $_POST["query"]))) { @set_time_limit(0); $query = str_replace("\r", "", $query); - if (strlen($query) && end($history) != $query) { + if (strlen($query) && $history[count($history) - 1] != $query) { $history[] = $query; } $delimiter = ";";