From 98299e332f3cbe56228fd84b2672aeaa6c6b8fa0 Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 20 Oct 2008 09:21:36 +0000 Subject: - little improvement in in_array_nocase() git-svn-id: https://svn.roundcube.net/trunk@1996 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/rcube_shared.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index af5eb1fda..3b63d9c0e 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/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; -- cgit v1.2.3