]> git.mxchange.org Git - friendica.git/commitdiff
silencing stdclass warnings
authorFriendika <info@friendika.com>
Mon, 23 May 2011 02:20:33 +0000 (19:20 -0700)
committerFriendika <info@friendika.com>
Mon, 23 May 2011 02:20:33 +0000 (19:20 -0700)
addon/facebook/facebook.php

index 667b2ce6f2ab52123f27dc90aa25ee7539f3e41f..83a34c07265e6b7c1c018d3bd900646bb8942e43 100644 (file)
@@ -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) {