From be98408f40b68b7f935821819d3a84156074e188 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 23 May 2012 02:35:27 -0400
Subject: [PATCH] Fix possible PHP warning in in_array_nocase() when 2nd argument is not an array

---
 program/include/rcube_shared.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index ebea612..08fca48 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -38,7 +38,7 @@
 function in_array_nocase($needle, $haystack)
 {
     $needle = mb_strtolower($needle);
-    foreach ($haystack as $value) {
+    foreach ((array)$haystack as $value) {
         if ($needle === mb_strtolower($value)) {
             return true;
         }

--
Gitblit v1.9.1