Don't refer to last array element by count
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@741 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
53a3cd11d3
commit
ffe563cbf0
|
@ -7,7 +7,7 @@ if (!$error && $_POST) {
|
||||||
@set_time_limit(0); // set_time_limit() can be disabled
|
@set_time_limit(0); // set_time_limit() can be disabled
|
||||||
$query = str_replace("\r", "", $query); // parser looks for \n
|
$query = str_replace("\r", "", $query); // parser looks for \n
|
||||||
$query = rtrim($query);
|
$query = rtrim($query);
|
||||||
if (strlen($query) && $history[count($history)-1] != $query) { // don't add repeated
|
if (strlen($query) && (!$history || end($history) != $query)) { // don't add repeated
|
||||||
$history[] = $query;
|
$history[] = $query;
|
||||||
}
|
}
|
||||||
$delimiter = ";";
|
$delimiter = ";";
|
||||||
|
|
Loading…
Reference in a new issue