diff --git a/resources/inc/class.resources_hooks.inc.php b/resources/inc/class.resources_hooks.inc.php index ebce431b03..3035d6240c 100644 --- a/resources/inc/class.resources_hooks.inc.php +++ b/resources/inc/class.resources_hooks.inc.php @@ -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); + } } }