From 2ed9d2dac5c2eb0d44c1168cdd861c925f184fb6 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 8 Jul 2009 00:30:18 -0700 Subject: [PATCH] Get rid of error ('Trying to get property of non-object') --- lib/facebookutil.php | 2 +- lib/twitter.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/facebookutil.php b/lib/facebookutil.php index 4d0df797be..5eb9534b16 100644 --- a/lib/facebookutil.php +++ b/lib/facebookutil.php @@ -108,11 +108,11 @@ function facebookBroadcastNotice($notice) { $facebook = getFacebook(); $flink = Foreign_link::getByUserID($notice->profile_id, FACEBOOK_SERVICE); - $fbuid = $flink->foreign_id; if (isFacebookBound($notice, $flink)) { $status = null; + $fbuid = $flink->foreign_id; // Get the status 'verb' (prefix) the user has set try { diff --git a/lib/twitter.php b/lib/twitter.php index 3ec082686a..d5eba084b3 100644 --- a/lib/twitter.php +++ b/lib/twitter.php @@ -367,7 +367,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_null($flink) && is_twitter_bound($notice, $flink)) { + if (is_twitter_bound($notice, $flink)) { $fuser = $flink->getForeignUser(); $twitter_user = $fuser->nickname;