mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 20:51:23 +01:00
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
5e23bd2ce8
commit
6faf899733
@ -152,12 +152,16 @@ class resources_hooks
|
|||||||
$query = array('filter' => $args['cat_id']);
|
$query = array('filter' => $args['cat_id']);
|
||||||
$bo = new resources_bo();
|
$bo = new resources_bo();
|
||||||
$bo->get_rows($query, $resources, $readonly);
|
$bo->get_rows($query, $resources, $readonly);
|
||||||
|
|
||||||
foreach($resources as $resource)
|
foreach($resources as $resource)
|
||||||
|
{
|
||||||
|
if(is_array($resource))
|
||||||
{
|
{
|
||||||
$resource['cat_id'] = $new_cat_id;
|
$resource['cat_id'] = $new_cat_id;
|
||||||
$bo->save($resource);
|
$bo->save($resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* populates $settings for the preferences
|
* populates $settings for the preferences
|
||||||
|
Loading…
Reference in New Issue
Block a user