Since cache builders are singletons, before reading tags, the previously read tags need to be removed, i.e. `$tags` needs to be emptied.
* Reads associated tags.
*/
protected function getTags() {
+ $this->tags = array();
+
if (!empty($this->objectTypeIDs)) {
// get tag ids
$tagIDs = array();
$conditionBuilder->add('object.languageID IN (?)', array($this->languageIDs));
$sql = "SELECT COUNT(*) AS counter, object.tagID
FROM wcf".WCF_N."_tag_to_object object
- ".$conditionBuilder->__toString()."
+ ".$conditionBuilder."
GROUP BY object.tagID
ORDER BY counter DESC";
$statement = WCF::getDB()->prepareStatement($sql, 500);