QA
Dieser Commit ist enthalten in:
Ursprung
d732c0c9eb
Commit
15c13fd0cd
1 geänderte Dateien mit 6 neuen und 6 gelöschten Zeilen
|
@ -182,7 +182,7 @@ class Msd_Sql_Object
|
||||||
$pointer = $this->getPointer();
|
$pointer = $this->getPointer();
|
||||||
$offset = $pointer;
|
$offset = $pointer;
|
||||||
$notFound = true;
|
$notFound = true;
|
||||||
$length = $this->getLength()-1;
|
$length = $this->getLength() - 1;
|
||||||
while ($notFound && $offset < $length) {
|
while ($notFound && $offset < $length) {
|
||||||
//echo "<br>Checking: ". substr($this->_data, $offset);
|
//echo "<br>Checking: ". substr($this->_data, $offset);
|
||||||
$nextHit = strpos($this->_data, $match, $offset);
|
$nextHit = strpos($this->_data, $match, $offset);
|
||||||
|
@ -192,15 +192,15 @@ class Msd_Sql_Object
|
||||||
}
|
}
|
||||||
// now check if we found an escaped occurance
|
// now check if we found an escaped occurance
|
||||||
$string = substr($this->_data, $pointer, $nextHit);
|
$string = substr($this->_data, $pointer, $nextHit);
|
||||||
$string=str_replace('\\\\','',trim($string));
|
$string = str_replace('\\\\', '', trim($string));
|
||||||
$quotes=substr_count($string,'\'');
|
$quotes = substr_count($string, '\'');
|
||||||
$escaped_quotes=substr_count($string,'\\\'');
|
$escaped_quotes = substr_count($string, '\\\'');
|
||||||
if (($quotes-$escaped_quotes) % 2 == 0) {
|
if (($quotes - $escaped_quotes) % 2 == 0) {
|
||||||
// hit was not escaped - we found the match
|
// hit was not escaped - we found the match
|
||||||
$notFound = false;
|
$notFound = false;
|
||||||
} else {
|
} else {
|
||||||
// keep on looking, this was escaped
|
// keep on looking, this was escaped
|
||||||
$offset = $pointer + $nextHit +1;
|
$offset = $pointer + $nextHit + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $nextHit;
|
return $nextHit;
|
||||||
|
|
Laden …
In neuem Issue referenzieren