mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Avoid warning from array_shift() if egw_link::delete_attached() doesn't return an array
This commit is contained in:
parent
5495491e78
commit
3333d18fae
@ -673,7 +673,7 @@ class resources_bo
|
||||
*/
|
||||
function remove_picture($res_id)
|
||||
{
|
||||
if (($arr = egw_link::delete_attached('resources',$res_id,self::PICTURE_NAME)))
|
||||
if (($arr = egw_link::delete_attached('resources',$res_id,self::PICTURE_NAME)) && is_array($arr))
|
||||
{
|
||||
return array_shift($arr); // $arr = array($path => (bool)$ok);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user