From 4d4fff739b9126140c72c1bab4d0558109a5d24d Mon Sep 17 00:00:00 2001 From: Robin Johnson Date: Thu, 25 Jul 2002 23:06:00 +0000 Subject: [PATCH] libraries/sqlparser.lib.php3: - Fix strpos on line 168/169 to work with PHP3 --- ChangeLog | 6 +++++- libraries/sqlparser.lib.php3 | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18ff101dd..ca5fd482a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,9 +6,13 @@ $Id$ $Source$ 2002-07-24 Robin Johnson - * config.inc.php3, libraries/sqlparser.lib.php3: + * config.inc.php3: - Fix code to work around CSS bug in Mozilla/Konqueror with 'inherit' value. + * libraries/sqlparser.lib.php3: + - Fix code to work around CSS bug in Mozilla/Konqueror with 'inherit' + value. + - Fix strpos on line 168/169 to work with PHP3 2002-07-25 Marc Delisle * Documentation.html, clarify about mysql extensions diff --git a/libraries/sqlparser.lib.php3 b/libraries/sqlparser.lib.php3 index e9072c8a6..6ae2dc9a4 100644 --- a/libraries/sqlparser.lib.php3 +++ b/libraries/sqlparser.lib.php3 @@ -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; }