diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-12-19 09:05:18 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-22 20:20:13 +0100 |
commit | 1b5175d01834796ee80134fd214ada71dd409dbd (patch) | |
tree | a92b38db9f4161da3d108fa75675e4863de41560 | |
parent | 0bfda6d4c85cb90ef4e29f8f69995a69794a616e (diff) | |
download | volse-hubzilla-1b5175d01834796ee80134fd214ada71dd409dbd.tar.gz volse-hubzilla-1b5175d01834796ee80134fd214ada71dd409dbd.tar.bz2 volse-hubzilla-1b5175d01834796ee80134fd214ada71dd409dbd.zip |
check if we deal with an array before sizeof()
(cherry picked from commit 339c9cceeca1e9b54aa320aea48d164d1cc22e36)
-rw-r--r-- | Zotlabs/Module/Linkinfo.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zotlabs/Module/Linkinfo.php b/Zotlabs/Module/Linkinfo.php index 7c7dc0e88..8b7defa39 100644 --- a/Zotlabs/Module/Linkinfo.php +++ b/Zotlabs/Module/Linkinfo.php @@ -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)) { |