summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/twitter.php
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:53:16 +0000
commitc498f6e1ba50d8c17cd1d8698f05f7604d5cfcf8 (patch)
tree21412c486d98fa10e3969b155922f766acabca54 /plugins/TwitterBridge/twitter.php
parent6b887728b2c84fec39a576e6f2a76909b6318774 (diff)
Twitter bridge - fix for Ticket #2192
Diffstat (limited to 'plugins/TwitterBridge/twitter.php')
-rw-r--r--plugins/TwitterBridge/twitter.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/TwitterBridge/twitter.php b/plugins/TwitterBridge/twitter.php
index e5afde62c..ceb83b037 100644
--- a/plugins/TwitterBridge/twitter.php
+++ b/plugins/TwitterBridge/twitter.php
@@ -1,7 +1,7 @@
<?php
/*
* StatusNet - the distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, StatusNet, Inc.
+ * Copyright (C) 2008-2010 StatusNet, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -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();