From 5fe59322bc9e2be876952c29a52ff43513f46463 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:12:36 -0700 Subject: [PATCH] Check for Twitter foreign link actually existing before trying to delete it; friendlier error message in TwittersettingsAction --- plugins/TwitterBridge/twittersettings.php | 5 +++++ 1 file changed, 5 insertions(+) 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)) { -- 2.39.5