summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-02-17 20:53:16 +0000
committerZach Copley <zach@status.net>2010-02-17 20:56:18 +0000
commita80fdf3142d05bdae77874acc7413cbbd70fad3d (patch)
tree38ef55c96cd02a4171af33de52c3eb627a526dd7
parent4d97f83740401ca98f4cd6d6d285dba0000d34dd (diff)
Twitter bridge - fix for Ticket #2192
-rw-r--r--plugins/TwitterBridge/twitter.php12
-rw-r--r--plugins/TwitterBridge/twitterauthorization.php6
2 files changed, 11 insertions, 7 deletions
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index 2dd815d3c..13e499d65 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -33,11 +33,15 @@ function add_twitter_user($twitter_id, $screen_name)
// repoed, and things like that.
$luser = Foreign_user::getForeignUser($twitter_id, TWITTER_SERVICE);
- $result = $luser->delete();
- if ($result != false) {
- common_log(LOG_INFO,
- "Twitter bridge - removed old Twitter user: $screen_name ($twitter_id).");
+ if (!empty($luser)) {
+ $result = $luser->delete();
+ if ($result != false) {
+ common_log(
+ LOG_INFO,
+ "Twitter bridge - removed old Twitter user: $screen_name ($twitter_id)."
+ );
+ }
}
$fuser = new Foreign_user();
diff --git a/plugins/TwitterBridge/twitterauthorization.php b/plugins/TwitterBridge/twitterauthorization.php
index 8bfdacee9..cabf69d7a 100644
--- a/plugins/TwitterBridge/twitterauthorization.php
+++ b/plugins/TwitterBridge/twitterauthorization.php
@@ -178,7 +178,7 @@ class TwitterauthorizationAction extends Action
);
common_log(LOG_INFO, 'Twitter bridge - ' . $msg);
$this->serverError(
- _m('Couldn\'t link your Twitter account: ') . $e->getMessage()
+ _m('Couldn\'t link your Twitter account.')
);
}
@@ -226,7 +226,7 @@ class TwitterauthorizationAction extends Action
);
common_log(LOG_INFO, 'Twitter bridge - ' . $msg);
$this->serverError(
- _m('Couldn\'t link your Twitter account: ') . $e-getMessage()
+ _m('Couldn\'t link your Twitter account.')
);
}
@@ -292,7 +292,7 @@ class TwitterauthorizationAction extends Action
if (empty($flink_id)) {
common_log_db_error($flink, 'INSERT', __FILE__);
- $this->serverError(_('Couldn\'t link your Twitter account.'));
+ $this->serverError(_('Couldn\'t link your Twitter account.'));
}
return $flink_id;