Ignore whitespace after semicolon
This commit is contained in:
parent
ef867e6bd1
commit
998e2f5027
|
@ -33,7 +33,7 @@ if (!$error && $_POST) {
|
||||||
@ini_set("memory_limit", max(ini_bytes("memory_limit"), 2 * strlen($query) + memory_get_usage() + 8e6)); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
|
@ini_set("memory_limit", max(ini_bytes("memory_limit"), 2 * strlen($query) + memory_get_usage() + 8e6)); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
|
||||||
}
|
}
|
||||||
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
|
if ($query != "" && strlen($query) < 1e6) { // don't add big queries
|
||||||
$q = $query . (ereg(';$', $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
$q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
|
||||||
if (!$history || end($history) != $q) { // no repeated queries
|
if (!$history || end($history) != $q) { // no repeated queries
|
||||||
$history[] = $q;
|
$history[] = $q;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue