* API: fix for wrong (unexpected array) type passed in check_list

This commit is contained in:
Klaus Leithoff 2013-07-08 08:02:30 +00:00
parent b5d5f7364f
commit 0c99b3045e

View File

@ -344,7 +344,7 @@ class categories
{
$parents[] = $cat['id'];
}
if($parent_id || !$cats) // Avoid wiping search results
{
// Go find the children
@ -470,7 +470,11 @@ class categories
function check_list($needed, $cat_list)
{
if (empty($cat_list)) return $cat_list;
if (is_array($cat_list))
{
$cat_list = implode(',',$cat_list);
error_log(__METHOD__.__LINE__.' string expected, array found for cat_list. Converted to:'.$cat_list);
}
$cat_arr = explode(',',$cat_list);
if (!empty($cat_arr) && is_array($cat_arr) && count($cat_arr) > 0)
{