diff options
author | Brion Vibber <brion@pobox.com> | 2010-10-08 11:12:36 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-10-08 11:12:36 -0700 |
commit | 5fe59322bc9e2be876952c29a52ff43513f46463 (patch) | |
tree | bd858e9c9a00ebba938d38d1b498d0ca24ddb443 /plugins | |
parent | 7adc6027ff3c344f549bddd2c60372a2c5ea9c40 (diff) |
Check for Twitter foreign link actually existing before trying to delete it; friendlier error message in TwittersettingsAction
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TwitterBridge/twittersettings.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php index dab8ab34f..33c5eb65b 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)) { |