From: Brion Vibber Date: Fri, 8 Oct 2010 18:12:36 +0000 (-0700) Subject: Check for Twitter foreign link actually existing before trying to delete it; friendli... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5fe59322bc9e2be876952c29a52ff43513f46463;p=quix0rs-gnu-social.git Check for Twitter foreign link actually existing before trying to delete it; friendlier error message in TwittersettingsAction --- diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php index dab8ab34fe..33c5eb65bb 100644 --- a/plugins/TwitterBridge/twittersettings.php +++ b/plugins/TwitterBridge/twittersettings.php @@ -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)) {