Commit 1b5175d0 authored by Mario's avatar Mario Committed by Mario

check if we deal with an array before sizeof()


(cherry picked from commit 339c9cce)
parent 0bfda6d4
Pipeline #98593 passed with stage
in 9 minutes and 19 seconds
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment