Those variables were set for a reason
The ->_subscription variable etc. were set because they were used later.
This commit is contained in:
parent
3927acdde5
commit
bc51c6b64f
@ -67,7 +67,7 @@ class AtompubshowmembershipAction extends AtompubAction
|
||||
|
||||
$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);
|
||||
}
|
||||
|
@ -70,7 +70,9 @@ class AtompubshowsubscriptionAction extends AtompubAction
|
||||
$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.'),
|
||||
|
Loading…
Reference in New Issue
Block a user