aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-12-22 20:18:41 +0100
committerMario <mario@mariovavti.com>2018-12-22 20:18:41 +0100
commit6d7fba6758624c7877a8a8908390bdf41403935d (patch)
tree51afbf1558c48437ee1b19b093be833082a4a476
parentfac3579fb0124a13c5066c660e8a2bd89ed1e144 (diff)
parent774dd6d5e333ac1988f1f3d830627cd7af68908e (diff)
downloadvolse-hubzilla-6d7fba6758624c7877a8a8908390bdf41403935d.tar.gz
volse-hubzilla-6d7fba6758624c7877a8a8908390bdf41403935d.tar.bz2
volse-hubzilla-6d7fba6758624c7877a8a8908390bdf41403935d.zip
Merge branch 'fix_linkinfo_warning' into 'dev'
check if we deal with an array before sizeof() See merge request hubzilla/core!1444
-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..32b4c0281 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"]) && count($siteinfo["images"])){
/* 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)) {