]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Check for Twitter foreign link actually existing before trying to delete it; friendli...
authorBrion Vibber <brion@pobox.com>
Fri, 8 Oct 2010 18:12:36 +0000 (11:12 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 8 Oct 2010 18:12:36 +0000 (11:12 -0700)
plugins/TwitterBridge/twittersettings.php

index dab8ab34fe2514595ec53c3fad22434e085e1b0b..33c5eb65bb23c3c291022f2fd7f5589a6cf33511 100644 (file)
@@ -247,6 +247,11 @@ class TwittersettingsAction extends ConnectSettingsAction
         $user = common_current_user();
         $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE);
 
+        if (empty($flink)) {
+            $this->clientError(_m('No Twitter connection to remove.'));
+            return;
+        }
+
         $result = $flink->safeDelete();
 
         if (empty($result)) {