Backport 31157: Make sure criteria is an array before checking for cat_id

This commit is contained in:
Nathan Gray 2010-06-28 14:12:03 +00:00
parent 9efe355b5c
commit 5cc3058eda

View File

@ -247,7 +247,7 @@ class addressbook_sql extends so_sql_cf
$owner = isset($filter['owner']) ? $filter['owner'] : (isset($criteria['owner']) ? $criteria['owner'] : null);
// fix cat_id criteria to search in comma-separated multiple cats and return subcats
if (($cats = $criteria['cat_id']))
if (is_array($criteria) && ($cats = $criteria['cat_id']))
{
$criteria += $this->_cat_search($criteria['cat_id'],$not);
unset($criteria['cat_id']);