check if we deal with an array before sizeof()

(cherry picked from commit 339c9cceec)
This commit is contained in:
Mario Vavti 2018-12-19 09:05:18 +00:00 committed by Mario
parent 0bfda6d4c8
commit 1b5175d018

View File

@ -139,7 +139,7 @@ class Linkinfo extends \Zotlabs\Web\Controller {
$image = ""; $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 */ /* Execute below code only if image is present in siteinfo */
$total_images = 0; $total_images = 0;