From 08c7c62b57b0d6d8f126e8629b8e8da71bd9636f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Feb 2012 13:23:38 +0200 Subject: Fix escape_like_str() --- system/database/drivers/oci8/oci8_driver.php | 4 ++-- user_guide_src/source/changelog.rst | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php index 3c70ccd9f..007e56a0b 100644 --- a/system/database/drivers/oci8/oci8_driver.php +++ b/system/database/drivers/oci8/oci8_driver.php @@ -477,8 +477,8 @@ class CI_DB_oci8_driver extends CI_DB { // escape LIKE condition wildcards if ($like === TRUE) { - 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), + return str_replace(array($this->_like_escape_chr.$this->_like_escape_chr, '%', '_'), + array($this->_like_escape_chr.$this->_like_escape_chr, $this->_like_escape_chr.'%', $this->_like_escape_chr.'_'), $str); } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index d5125591c..15b531665 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -114,8 +114,9 @@ Bug fixes for 3.0 - Fixed a possible bug in ``CI_Input::is_ajax_request()`` where some clients might not send the X-Requested-With HTTP header value exactly as 'XmlHttpRequest'. - Fixed a bug (#1039) - MySQL's _backup() method failed due to a table name not being escaped. - Fixed a bug (#1070) - CI_DB_driver::initialize() didn't set a character set if a database is not selected. -- Fixed a bug in the Oracle (oci8) instance of :doc:`Database Forge Class ` where ``create_table()`` would fail if used with ``AUTO_INCREMENT`` as it's not supported by Oracle. -- Fixed a bug (#413) - The Oracle (oci8) database driver only used to return connection-related errors in `_error_message()` and `_error_number()`. +- Fixed a bug in the Oracle (oci8) instance of :doc:`Database Forge Class ` where create_table() would fail if used with AUTO_INCREMENT as it's not supported by Oracle. +- Fixed a bug (#413) - The Oracle (oci8) database driver only used to return connection-related errors in _error_message() and _error_number(). +- Fixed a bug (#68, #414) - Oracle's escape_like_str() didn't properly escape the LIKE wild characters. Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b