Browse Source

Fix query return type in Widget\TagCloud

pull/6485/head
Hypolite Petovan 2 years ago
parent
commit
ddad9721c0
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/Content/Widget/TagCloud.php

+ 4
- 2
src/Content/Widget/TagCloud.php View File

@ -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);
}


Loading…
Cancel
Save