From: Hypolite Petovan Date: Mon, 21 Jan 2019 21:55:35 +0000 (-0500) Subject: Fix query return type in Widget\TagCloud X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ddad9721c024523232b944ea24d37ae8c7c69967;p=friendica.git Fix query return type in Widget\TagCloud --- diff --git a/src/Content/Widget/TagCloud.php b/src/Content/Widget/TagCloud.php index 62301729b7..8413eccd19 100644 --- a/src/Content/Widget/TagCloud.php +++ b/src/Content/Widget/TagCloud.php @@ -89,7 +89,7 @@ class TagCloud } // Fetch tags - $r = DBA::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term` + $tag_stmt = DBA::p("SELECT `term`, COUNT(`term`) AS `total` FROM `term` LEFT JOIN `item` ON `term`.`oid` = `item`.`id` WHERE `term`.`uid` = ? AND `term`.`type` = ? AND `term`.`otype` = ? @@ -100,10 +100,12 @@ class TagCloud $type, TERM_OBJ_POST ); - if (!DBA::isResult($r)) { + if (!DBA::isResult($tag_stmt)) { return []; } + $r = DBA::toArray($tag_stmt); + return self::tagCalc($r); }