Fixed like loading issue
authorMarcel Werk <burntime@woltlab.com>
Sat, 6 Dec 2014 01:22:32 +0000 (02:22 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 6 Dec 2014 01:22:32 +0000 (02:22 +0100)
wcfsetup/install/files/lib/data/like/LikeAction.class.php

index 97f3b4f8bbff8d169deb8261ff50ba5dcb76df85..f26d00596159ac5be8f42736fbdc9b01d4d81b04 100644 (file)
@@ -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')
                );
        }