summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-10-25 12:25:13 +0200
committerAndrey Andreev <narf@bofh.bg>2012-10-25 12:25:13 +0200
commite47425844e84d54c659280c04f450a3526b4e09d (patch)
treeeb907b478c59801dd691dfef723b169560522cbf /system/database/DB_driver.php
parent9093042c1f56bbdce2785ec5de0cd4180b4e6216 (diff)
Add missing delimiter in preg_quote() occurences (fix #1929)
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r--system/database/DB_driver.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 7f1434fc1..e8286aaa1 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -640,7 +640,7 @@ abstract class CI_DB_driver {
// Make sure not to replace a chunk inside a string that happens to match the bind marker
if ($c = preg_match_all("/'[^']*'/i", $sql, $matches))
{
- $c = preg_match_all('/'.preg_quote($this->bind_marker).'/i',
+ $c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i',
str_replace($matches[0],
str_replace($this->bind_marker, str_repeat(' ', $ml), $matches[0]),
$sql, $c),
@@ -652,7 +652,7 @@ abstract class CI_DB_driver {
return $sql;
}
}
- elseif (($c = preg_match_all('/'.preg_quote($this->bind_marker).'/i', $sql, $matches, PREG_OFFSET_CAPTURE)) !== $bind_count)
+ elseif (($c = preg_match_all('/'.preg_quote($this->bind_marker, '/').'/i', $sql, $matches, PREG_OFFSET_CAPTURE)) !== $bind_count)
{
return $sql;
}
@@ -1007,13 +1007,13 @@ abstract class CI_DB_driver {
if (is_array($this->_escape_char))
{
$preg_ec = array(
- preg_quote($this->_escape_char[0]), preg_quote($this->_escape_char[1]),
+ preg_quote($this->_escape_char[0], '/'), preg_quote($this->_escape_char[1], '/'),
$this->_escape_char[0], $this->_escape_char[1]
);
}
else
{
- $preg_ec[0] = $preg_ec[1] = preg_quote($this->_escape_char);
+ $preg_ec[0] = $preg_ec[1] = preg_quote($this->_escape_char, '/');
$preg_ec[2] = $preg_ec[3] = $this->_escape_char;
}
}
@@ -1172,7 +1172,7 @@ abstract class CI_DB_driver {
if (empty($_operators))
{
$_les = ($this->_like_escape_str !== '')
- ? '\s+'.preg_quote(trim(sprintf($this->_like_escape_str, $this->_like_escape_chr)))
+ ? '\s+'.preg_quote(trim(sprintf($this->_like_escape_str, $this->_like_escape_chr)), '/')
: '';
$_operators = array(
'\s*(?:<|>|!)?=\s*', // =, <=, >=, !=