]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Get rid of error ('Trying to get property of non-object')
authorZach Copley <zach@controlyourself.ca>
Wed, 8 Jul 2009 07:30:18 +0000 (00:30 -0700)
committerZach Copley <zach@controlyourself.ca>
Wed, 8 Jul 2009 07:30:18 +0000 (00:30 -0700)
lib/facebookutil.php
lib/twitter.php

index 4d0df797bedf820867cdda6dc8b0ec321cd91fb8..5eb9534b1641bb6d9afcc212870d95ac840f004e 100644 (file)
@@ -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 {
index 3ec082686aff7c3ba89095494d34ac1384ad4a7e..d5eba084b3ee482ff304cf0e6f0c397c89a9118a 100644 (file)
@@ -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;