summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-20 09:21:36 +0000
committeralecpl <alec@alec.pl>2008-10-20 09:21:36 +0000
commitba80566b1eae376997567c2801c65e8e358612ed (patch)
tree8e9c732b5febfed67088a8c808ee39ba20b7e459 /program/include
parent7f639467194da6d6a4059d75fb2307ffe1201ab5 (diff)
- little improvement in in_array_nocase()
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_shared.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index af5eb1fda..3b63d9c0e 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -209,8 +209,9 @@ function array2js($arr, $type='')
*/
function in_array_nocase($needle, $haystack)
{
+ $needle = rc_strtolower($needle);
foreach ($haystack as $value)
- if (rc_strtolower($needle)===rc_strtolower($value))
+ if ($needle===rc_strtolower($value))
return true;
return false;