libraries/sqlparser.lib.php3:

- Fix strpos on line 168/169 to work with PHP3
This commit is contained in:
Robin Johnson
2002-07-25 23:06:00 +00:00
parent c6ea79ba9b
commit 4d4fff739b
2 changed files with 7 additions and 3 deletions

View File

@@ -165,9 +165,9 @@ if (!defined('PMA_SQP_LIB_INCLUDED')) {
$oldpos = 0;
do {
$oldpos = $pos;
$pos = strpos($sql, $quotetype, $oldpos);
$pos = strpos(' ' . $sql, $quotetype, $oldpos + 1) - 1;
// ($pos === FALSE)
if (!is_integer($pos)) {
if ($pos < 0) {
trigger_error('Syntax: Unclosed quote (' . $quotetype . ') at ' . $startquotepos);
return;
}