From 9bb9469cabd15eb8e8e15fa3b2740bf92bc16ff4 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 7 Aug 2015 13:29:11 +0300 Subject: Fix #4023 Close #4024 --- system/helpers/string_helper.php | 2 +- user_guide_src/source/changelog.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 28e6ab15f..637835160 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php @@ -253,7 +253,7 @@ if ( ! function_exists('increment_string')) */ function increment_string($str, $separator = '_', $first = 1) { - preg_match('/(.+)' . preg_quote($separator) . '([0-9]+)$/', $str, $match); + preg_match('/(.+)'.preg_quote($separator, '/').'([0-9]+)$/', $str, $match); return isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $str.$separator.$first; } } diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index cfa0f69a5..dcdd36b57 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -78,6 +78,7 @@ Bug fixes for 3.0.1 - Fixed a bug (#4015) - :doc:`Email Library ` method ``set_header()`` didn't support method chaining, although it was advertised. - Fixed a bug (#4027) - :doc:`Routing ` with HTTP verbs only worked if the route request method was declared in all-lowercase letters. - Fixed a bug (#4026) - :doc:`Database Transactions ` always rollback if any previous ``query()`` call fails. +- Fixed a bug (#4023) - :doc:`String Helper ` function ``increment_string()`` didn't escape its ``$separator`` parameter. Version 3.0.0 ============= -- cgit v1.2.3-24-g4f1b