diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-02 13:16:41 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-04-02 13:16:41 +0200 |
commit | 36b0c949fdb16163e4b57b1db0cbc777941eff6f (patch) | |
tree | c9a3d2d78b0d997f552d27c017c19b845bb809b3 | |
parent | 2e1f1804d55f534d654f7b8ae1e9db26c19d2501 (diff) |
Fixed issue #153 Escape Str Bug in MSSQL driver
-rw-r--r-- | system/database/drivers/mssql/mssql_driver.php | 8 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php index b581a478c..65397ed8f 100644 --- a/system/database/drivers/mssql/mssql_driver.php +++ b/system/database/drivers/mssql/mssql_driver.php @@ -267,9 +267,11 @@ class CI_DB_mssql_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); + $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; diff --git a/user_guide/changelog.html b/user_guide/changelog.html index bf86172d7..b1900301a 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -84,6 +84,7 @@ Hg Tag: n/a</p> <li class="reactor">Fixed a bug (Reactor #80) where is_really_writable would create an empty file when on Windows or with safe_mode enabled.</li> <li class="reactor">Fixed various bugs with User Guide.</li> <li class="reactor">Added form_validation_lang entries for <kbd>decimal</kbd>, <kbd>less_than</kbd> and <kbd>greater_than</kbd>.</li> + <li class="reactor"><a href="https://bitbucket.org/ellislab/codeigniter-reactor/issue/153/escape-str-bug-in-mssql-driver">Fixed issue #153</a> Escape Str Bug in MSSQL driver.</li> </ul> <h2>Version 2.0.1</h2> |