summaryrefslogtreecommitdiffstats
path: root/system/helpers/inflector_helper.php
diff options
context:
space:
mode:
authorIvan Tcholakov <ivantcholakov@gmail.com>2016-02-07 20:33:46 +0100
committerIvan Tcholakov <ivantcholakov@gmail.com>2016-02-07 20:33:46 +0100
commit9fee9e450372963e0869ed4fe034acebc74b7a81 (patch)
treeb1ef0583566a6a41ecb3200e05b5b75bde7cb1eb /system/helpers/inflector_helper.php
parentc52ff48f7449b25719fde942757f6043a2d14dde (diff)
hunanize() helper: Escaping the $separator argument.
Diffstat (limited to 'system/helpers/inflector_helper.php')
-rw-r--r--system/helpers/inflector_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index 96b723c8d..c064d8de4 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -219,7 +219,7 @@ if ( ! function_exists('humanize'))
*/
function humanize($str, $separator = '_')
{
- return ucwords(preg_replace('/['.$separator.']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str))));
+ return ucwords(preg_replace('/['.preg_quote($separator).']+/', ' ', trim(MB_ENABLED ? mb_strtolower($str) : strtolower($str))));
}
}