check if we deal with an array before sizeof()

This commit is contained in:
Mario Vavti 2018-12-19 10:05:18 +01:00
parent 6fc8c174f9
commit 339c9cceec

View File

@ -138,8 +138,8 @@ class Linkinfo extends \Zotlabs\Web\Controller {
}
$image = "";
if(sizeof($siteinfo["images"]) > 0){
if(is_array($siteinfo["images"]) && (sizeof($siteinfo["images"]) > 0)){
/* Execute below code only if image is present in siteinfo */
$total_images = 0;
@ -161,7 +161,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$total_images ++;
if($max_images && $max_images >= $total_images)
break;
}
}
}
if(strlen($text)) {