summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-03-07 23:22:57 +0100
committerAdrian Lang <mail@adrianlang.de>2009-03-11 10:40:14 +0100
commit048bc770777f325aea76315f44afedb2daf90f76 (patch)
tree98de41234d2862ab5d594a2ae1b081996fd83fe5 /lib
parentc0f44ca44d9530c3658d22c0b3ac311a60cbff6c (diff)
Add nullcheck for foreign profile.
Diffstat (limited to 'lib')
-rw-r--r--lib/twitter.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/twitter.php b/lib/twitter.php
index a3929524b..7abb40151 100644
--- a/lib/twitter.php
+++ b/lib/twitter.php
@@ -210,7 +210,7 @@ function save_twitter_friends($user, $twitter_id, $screen_name, $password)
function is_twitter_bound($notice, $flink) {
// Check to see if notice should go to Twitter
- if (($flink->noticesync & FOREIGN_NOTICE_SEND)) {
+ if ($flink->noticesync & FOREIGN_NOTICE_SEND) {
// If it's not a Twitter-style reply, or if the user WANTS to send replies.
if (!preg_match('/^@[a-zA-Z0-9_]{1,15}\b/u', $notice->content) ||
@@ -231,7 +231,7 @@ function broadcast_twitter($notice)
// XXX: Not sure WHERE to check whether a notice should go to
// Twitter. Should we even put in the queue if it shouldn't? --Zach
- if (is_twitter_bound($notice, $flink)) {
+ if (!is_null($flink) && is_twitter_bound($notice, $flink)) {
$fuser = $flink->getForeignUser();
$twitter_user = $fuser->nickname;