summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-20 06:41:54 +0000
committeralecpl <alec@alec.pl>2008-10-20 06:41:54 +0000
commit1ad39efbf4047285dd84762eb9dc55ebcd00b0a2 (patch)
treece067ff357da3e705004591629be27e75d3f6391
parent59ed6f16459318e3bf3babc3282402265cc84b92 (diff)
#1485504: fix _skipDelimitedStrings()
-rw-r--r--program/lib/MDB2.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/program/lib/MDB2.php b/program/lib/MDB2.php
index 776554182..5c4c8d2f9 100644
--- a/program/lib/MDB2.php
+++ b/program/lib/MDB2.php
@@ -2915,9 +2915,7 @@ class MDB2_Driver_Common extends PEAR
$colon = ':';
$positions = array();
$position = 0;
- $ignores = $this->string_quoting;
- $ignores[] = $this->identifier_quoting;
- $ignores[] = $this->sql_comments;
+
while ($position < strlen($query)) {
$q_position = strpos($query, $question, $position);
$c_position = strpos($query, $colon, $position);
@@ -3008,9 +3006,9 @@ class MDB2_Driver_Common extends PEAR
*/
function _skipDelimitedStrings($query, $position, $p_position)
{
- $ignores = $this->string_quoting;
- $ignores[] = $this->identifier_quoting;
- $ignores[] = $this->sql_comments;
+ $ignores[] = $this->string_quoting;
+ $ignores[] = $this->identifier_quoting;
+ $ignores = array_merge($ignores, $this->sql_comments);
foreach ($ignores as $ignore) {
if (!empty($ignore['start'])) {