]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correct check for error in subscribe and unsubscribe actions
authorEvan Prodromou <evan@status.net>
Wed, 13 Jan 2010 11:01:22 +0000 (03:01 -0800)
committerEvan Prodromou <evan@status.net>
Wed, 13 Jan 2010 11:01:22 +0000 (03:01 -0800)
actions/subscribe.php
actions/unsubscribe.php

index 4c46806e4047bcb211dcbffa71e2e2e8e376e076..a90d7facdfaca15e60c16d03c376833af228d448 100644 (file)
@@ -58,7 +58,7 @@ class SubscribeAction extends Action
 
         $result = subs_subscribe_to($user, $other);
 
-        if($result != true) {
+        if (is_string($result)) {
             $this->clientError($result);
             return;
         }
index dbb4e41538fbc8ccda75f1d74ee698e69c65de32..6bb10d448b3e663ceb85b214f8a0db774e39b421 100644 (file)
@@ -87,7 +87,7 @@ class UnsubscribeAction extends Action
 
         $result = subs_unsubscribe_to($user, $other);
 
-        if ($result != true) {
+        if (is_string($result)) {
             $this->clientError($result);
             return;
         }