Merge branch 'fix_linkinfo_warning' into 'dev'

check if we deal with an array before sizeof()

See merge request hubzilla/core!1444
This commit is contained in:
Mario 2018-12-22 20:18:41 +01:00
commit 6d7fba6758

View File

@ -138,8 +138,8 @@ class Linkinfo extends \Zotlabs\Web\Controller {
}
$image = "";
if(sizeof($siteinfo["images"]) > 0){
if(is_array($siteinfo["images"]) && count($siteinfo["images"])){
/* 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)) {