diff options
author | Ahmad Anbar <aanbar@gmail.com> | 2015-05-17 12:20:34 +0200 |
---|---|---|
committer | Ahmad Anbar <aanbar@gmail.com> | 2015-05-17 12:20:34 +0200 |
commit | 57940dedcaab05f2dc392b2757cb3d58c59274c9 (patch) | |
tree | 1783dc5a17cc20ddede409e13984576bff274302 /system/helpers | |
parent | 5e50c42ef27261bc7fcb279499ce76cfc2519aa6 (diff) | |
parent | 3a9eb39f61b10b3f86e50f4cd39ca0d9f010bac2 (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/array_helper.php | 4 | ||||
-rw-r--r-- | system/helpers/inflector_helper.php | 1 | ||||
-rw-r--r-- | system/helpers/url_helper.php | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php index e07b52bb5..2ce55b9c4 100644 --- a/system/helpers/array_helper.php +++ b/system/helpers/array_helper.php @@ -62,7 +62,7 @@ if ( ! function_exists('element')) * @param mixed * @return mixed depends on what the array contains */ - function element($item, $array, $default = NULL) + function element($item, array $array, $default = NULL) { return array_key_exists($item, $array) ? $array[$item] : $default; } @@ -99,7 +99,7 @@ if ( ! function_exists('elements')) * @param mixed * @return mixed depends on what the array contains */ - function elements($items, $array, $default = NULL) + function elements($items, array $array, $default = NULL) { $return = array(); diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php index d8ed45df9..f2890059f 100644 --- a/system/helpers/inflector_helper.php +++ b/system/helpers/inflector_helper.php @@ -133,6 +133,7 @@ if ( ! function_exists('plural')) } $plural_rules = array( + '/(quiz)$/' => '\1zes', // quizzes '/^(ox)$/' => '\1\2en', // ox '/([m|l])ouse$/' => '\1ice', // mouse, louse '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index bf623b000..5f8c6ce67 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -161,7 +161,7 @@ if ( ! function_exists('anchor')) $site_url = is_array($uri) ? site_url($uri) - : preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri); + : (preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri)); if ($title === '') { |