Avoid warning from array_shift() if egw_link::delete_attached() doesn't return an array

This commit is contained in:
Nathan Gray 2011-04-13 14:16:05 +00:00
parent 5495491e78
commit 3333d18fae

View File

@ -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);
}