Aleksander Machniak
2012-05-23 da19e0ee7c5656feb49553c398fdb94e3f618c26
Fix possible PHP warning in in_array_nocase() when 2nd argument is not an array

Conflicts:

program/include/rcube_shared.inc
1 files modified
8 ■■■■■ changed files
program/include/rcube_shared.inc 8 ●●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc
@@ -82,9 +82,11 @@
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;
}