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:
commit
6d7fba6758
@ -138,8 +138,8 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$image = "";
|
$image = "";
|
||||||
|
|
||||||
if(sizeof($siteinfo["images"]) > 0){
|
if(is_array($siteinfo["images"]) && count($siteinfo["images"])){
|
||||||
/* Execute below code only if image is present in siteinfo */
|
/* Execute below code only if image is present in siteinfo */
|
||||||
|
|
||||||
$total_images = 0;
|
$total_images = 0;
|
||||||
@ -161,7 +161,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
|
|||||||
$total_images ++;
|
$total_images ++;
|
||||||
if($max_images && $max_images >= $total_images)
|
if($max_images && $max_images >= $total_images)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strlen($text)) {
|
if(strlen($text)) {
|
||||||
|
Reference in New Issue
Block a user