Fix possible PHP warning in in_array_nocase() when 2nd argument is not an array

Conflicts:

	program/include/rcube_shared.inc
pull/17/head
Aleksander Machniak 12 years ago
parent 6e72994222
commit da19e0ee7c

@ -82,9 +82,11 @@ function send_future_expire_header($offset=2600000)
function in_array_nocase($needle, $haystack)
{
$needle = mb_strtolower($needle);
foreach ($haystack as $value)
if ($needle===mb_strtolower($value))
return true;
foreach ((array)$haystack as $value) {
if ($needle === mb_strtolower($value)) {
return true;
}
}
return false;
}

Loading…
Cancel
Save