aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Linkinfo.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-19 10:05:18 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-19 10:05:18 +0100
commit339c9cceeca1e9b54aa320aea48d164d1cc22e36 (patch)
tree8cd8a5589d7f791fef1dd75660b98de5f86b1652 /Zotlabs/Module/Linkinfo.php
parent6fc8c174f911b09382b3e106243128096cef9f49 (diff)
downloadvolse-hubzilla-339c9cceeca1e9b54aa320aea48d164d1cc22e36.tar.gz
volse-hubzilla-339c9cceeca1e9b54aa320aea48d164d1cc22e36.tar.bz2
volse-hubzilla-339c9cceeca1e9b54aa320aea48d164d1cc22e36.zip
check if we deal with an array before sizeof()
Diffstat (limited to 'Zotlabs/Module/Linkinfo.php')
-rw-r--r--Zotlabs/Module/Linkinfo.php6
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)) {