correct check for error in subscribe and unsubscribe actions
This commit is contained in:
parent
430bd69312
commit
601c371332
|
@ -58,7 +58,7 @@ class SubscribeAction extends Action
|
||||||
|
|
||||||
$result = subs_subscribe_to($user, $other);
|
$result = subs_subscribe_to($user, $other);
|
||||||
|
|
||||||
if($result != true) {
|
if (is_string($result)) {
|
||||||
$this->clientError($result);
|
$this->clientError($result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ class UnsubscribeAction extends Action
|
||||||
|
|
||||||
$result = subs_unsubscribe_to($user, $other);
|
$result = subs_unsubscribe_to($user, $other);
|
||||||
|
|
||||||
if ($result != true) {
|
if (is_string($result)) {
|
||||||
$this->clientError($result);
|
$this->clientError($result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user