From 7c02c2d46947e48659e817efd67a39dbf696c04c Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sat, 6 Dec 2014 02:22:32 +0100 Subject: [PATCH] Fixed like loading issue --- wcfsetup/install/files/lib/data/like/LikeAction.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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') ); } -- 2.20.1