diff options
author | Friendika <info@friendika.com> | 2011-05-22 19:20:33 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-22 19:20:33 -0700 |
commit | b3648de6f066aa25adf4c506001440e16f5914e7 (patch) | |
tree | d9849dc264a8b2b25715f09abc05010d7021d494 | |
parent | 44a22c29155fa3beeed7cd5d0add30818e409891 (diff) | |
download | volse-hubzilla-b3648de6f066aa25adf4c506001440e16f5914e7.tar.gz volse-hubzilla-b3648de6f066aa25adf4c506001440e16f5914e7.tar.bz2 volse-hubzilla-b3648de6f066aa25adf4c506001440e16f5914e7.zip |
silencing stdclass warnings
-rw-r--r-- | addon/facebook/facebook.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php index 667b2ce6f..83a34c072 100644 --- a/addon/facebook/facebook.php +++ b/addon/facebook/facebook.php @@ -628,10 +628,6 @@ function fb_consume_stream($uid,$j,$wall = false) { foreach($j->data as $entry) { logger('fb_consume: entry: ' . print_r($entry,true), LOGGER_DATA); $datarray = array(); - $we_posted = false; - $app = $entry->application; - if($app->id == get_config('facebook','appid') && $wall) - $we_posted = true; $r = q("SELECT * FROM `item` WHERE ( `uri` = '%s' OR `extid` = '%s') AND `uid` = %d LIMIT 1", dbesc('fb::' . $entry->id), @@ -705,8 +701,11 @@ function fb_consume_stream($uid,$j,$wall = false) { $orig_post = $r[0]; } - $likers = $entry->likes->data; - $comments = $entry->comments->data; + + if(isset($entry->likes) && isset($entry->likes->data)) + $likers = $entry->likes->data; + if(isset($entry->comments) && isset($entry->comments->data)) + $comments = $entry->comments->data; if(is_array($likers)) { foreach($likers as $likes) { |