From: Marcel Werk Date: Sat, 6 Dec 2014 01:22:32 +0000 (+0100) Subject: Fixed like loading issue X-Git-Tag: 2.1.0_Beta_1~89 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c02c2d46947e48659e817efd67a39dbf696c04c;p=GitHub%2FWoltLab%2FWCF.git Fixed like loading issue --- diff --git a/wcfsetup/install/files/lib/data/like/LikeAction.class.php b/wcfsetup/install/files/lib/data/like/LikeAction.class.php index 97f3b4f8bb..f26d005961 100644 --- a/wcfsetup/install/files/lib/data/like/LikeAction.class.php +++ b/wcfsetup/install/files/lib/data/like/LikeAction.class.php @@ -304,8 +304,7 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis } $likeList->getConditionBuilder()->add("like_table.likeValue = ?", array($this->parameters['likeValue'])); $likeList->readObjects(); - $lastLikeTime = $likeList->getLastLikeTime(); - if (!$lastLikeTime) { + if (!count($likeList)) { return array(); } @@ -315,7 +314,7 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis )); return array( - 'lastLikeTime' => $lastLikeTime, + 'lastLikeTime' => $likeList->getLastLikeTime(), 'template' => WCF::getTPL()->fetch('userProfileLikeItem') ); }