X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fcurrent_user.inc;h=c4d94539df5797c01dad0cfd64d9f4fc0c754242;hb=bd3023c1b5e64429043358a691b3aae20eb54c09;hp=017a54052bff8fa0868e18d55ffe8938eb4ad86e;hpb=84e2f869630484bd9380e5c30647a483bce14d1e;p=fa-stable.git diff --git a/includes/current_user.inc b/includes/current_user.inc index 017a5405..c4d94539 100644 --- a/includes/current_user.inc +++ b/includes/current_user.inc @@ -481,12 +481,13 @@ function array_search_value($needle, $haystack, $valuekey=null) function array_search_keys($needle, $haystack, $valuekey=null) { $keys = array(); - foreach($haystack as $key => $value) { - $val = isset($valuekey) ? $value[$valuekey] : $value; - if ($needle == $val){ - $keys[] = $key; + if($haystack) + foreach($haystack as $key => $value) { + $val = isset($valuekey) ? $value[$valuekey] : $value; + if ($needle == $val){ + $keys[] = $key; + } } - } return $keys; } //