forked from extern/egroupware
Check to make sure found resource is an array instead of a column flag.
Fixes fatal error when deleting a category.
This commit is contained in:
parent
fd0b513bbb
commit
5d36da8062
@ -152,10 +152,14 @@ class resources_hooks
|
||||
$query = array('filter' => $args['cat_id']);
|
||||
$bo = new resources_bo();
|
||||
$bo->get_rows($query, $resources, $readonly);
|
||||
|
||||
foreach($resources as $resource)
|
||||
{
|
||||
$resource['cat_id'] = $new_cat_id;
|
||||
$bo->save($resource);
|
||||
if(is_array($resource))
|
||||
{
|
||||
$resource['cat_id'] = $new_cat_id;
|
||||
$bo->save($resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user