The ->_subscription variable etc. were set because they were used later.
$this->_membership = Group_member::pkeyGet($kv);
- if (!$this->_profile->isMembmer($this->_group)) {
+ if (!$this->_membership instanceof Group_member) {
// TRANS: Client exception thrown when trying to show membership of a non-subscribed group
throw new ClientException(_('Not a member.'), 404);
}
$subscribedId), 404);
}
- if (!$this->_subscriber->isSubscribed($this->_subscribed)) {
+ $this->_subscription = Subscription::pkeyGet(array('subscriber' => $subscriberId,
+ 'subscribed' => $subscribedId));
+ if (!$this->_subscription instanceof Subscription) {
// TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID.
// TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to.
$msg = sprintf(_('Profile %1$d not subscribed to profile %2$d.'),