diff options
-rw-r--r-- | system/database/DB_driver.php | 2 | ||||
-rw-r--r-- | system/helpers/download_helper.php | 16 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
3 files changed, 8 insertions, 11 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 161e0e225..de599a675 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1118,7 +1118,7 @@ abstract class CI_DB_driver { */ protected function _escape_str($str) { - return str_replace("'", "''", remove_invisible_characters($str)); + return str_replace("'", "''", remove_invisible_characters($str, FALSE)); } // -------------------------------------------------------------------- diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index ea3da1bf4..b2f0edb48 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -77,6 +77,7 @@ if ( ! function_exists('force_download')) return; } + reset($filename); $filepath = key($filename); $filename = current($filename); @@ -84,23 +85,18 @@ if ( ! function_exists('force_download')) { return; } - - if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE) - { - return; - } } else { - if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) - { - return; - } - $filepath = $filename; $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); $filename = end($filename); } + + if ( ! @is_file($filepath) OR ($filesize = @filesize($filepath)) === FALSE) + { + return; + } } else { diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f61d97970..eddb2b946 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -11,6 +11,7 @@ Release Date: Not Released - Officially dropped any kind of support for anything under PHP 5.4.8. - Updated Welcome view and HTML error templates with new styling. + - Updated configurable directory paths to handle missing trailing ``DIRECTORY_SEPARATOR``s automatically. - Core |