diff --git a/classes/User.php b/classes/User.php index 8c9ffbb6d6..2d689fd2b9 100644 --- a/classes/User.php +++ b/classes/User.php @@ -267,14 +267,7 @@ class User extends Memcached_DataObject function hasFave($notice) { $fave = Fave::pkeyGet(array('user_id' => $this->id, 'notice_id' => $notice->id)); - if (!is_null($fave)) { - $result = true; - } else { - $result = false; - } - $fave->free(); - unset($fave); - return $result; + return ((is_null($fave)) ? false : true); } function mutuallySubscribed($other) {