mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 17:48:56 +01:00
Add a check to make sure $data is safe
This commit is contained in:
parent
b087295fd0
commit
7f919ed0e3
@ -583,9 +583,12 @@ class resources_bo
|
|||||||
);
|
);
|
||||||
$only_keys = 'res_id,name';
|
$only_keys = 'res_id,name';
|
||||||
$data = $this->so->search(array(),$only_keys,$order_by='name',$extra_cols='',$wildcard='%',$empty,$op='OR',$limit,$filter);
|
$data = $this->so->search(array(),$only_keys,$order_by='name',$extra_cols='',$wildcard='%',$empty,$op='OR',$limit,$filter);
|
||||||
foreach($data as $resource)
|
if(is_array($data) && $data)
|
||||||
{
|
{
|
||||||
$resources[$resource['res_id']] = $resource['name'];
|
foreach($data as $resource)
|
||||||
|
{
|
||||||
|
$resources[$resource['res_id']] = $resource['name'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resources;
|
return $resources;
|
||||||
|
Loading…
Reference in New Issue
Block a user