diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-20 13:20:39 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-20 13:20:39 +0100 |
commit | 55201acd0692f02eb5927f412db73b925b6ba738 (patch) | |
tree | e35ff976129843d036a5df2bfd76068bb9a38578 /system/database/drivers/postgre | |
parent | 02878c248f0fd83a890f9c75c54d9e39cd6be631 (diff) |
Fixed an issue with PostgreSQL's escape_str()
Diffstat (limited to 'system/database/drivers/postgre')
-rw-r--r-- | system/database/drivers/postgre/postgre_driver.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php index 1114e4cb2..8112cf9de 100644 --- a/system/database/drivers/postgre/postgre_driver.php +++ b/system/database/drivers/postgre/postgre_driver.php @@ -293,9 +293,9 @@ class CI_DB_postgre_driver extends CI_DB { // escape LIKE condition wildcards if ($like === TRUE) { - $str = str_replace( array('%', '_', $this->_like_escape_chr), - array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr), - $str); + return str_replace(array($this->_like_escape_chr, '%', '_'), + array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), + $str); } return $str; |