]> git.joonet.de Git - adminer.git/commitdiff
Test for empty history
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 15 Jun 2009 09:32:29 +0000 (09:32 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 15 Jun 2009 09:32:29 +0000 (09:32 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@692 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/sql.inc.php

index 1eca30b9cf842df0f36b0a96fc07ceb52dd31bfb..cd4efe826d5e68f85f00819b06702a33c941eaf8 100644 (file)
@@ -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 = ";";