]> git.mxchange.org Git - friendica.git/blobdiff - include/socgraph.php
Merge https://github.com/friendica/friendica into pull
[friendica.git] / include / socgraph.php
index 592779089785a4fc36bee616e0a0cf6fcd20670a..4fe9eaf9095cd029e20a11103f521e027757451e 100644 (file)
@@ -71,20 +71,24 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
 
                $name = $entry->displayName;
 
-               foreach($entry->urls as $url) {
-                       if($url->type == 'profile') {
-                               $profile_url = $url->value;
-                               continue;
-                       }
-                       if($url->type == 'webfinger') {
-                               $connect_url = str_replace('acct:' , '', $url->value);
-                               continue;
+               if(isset($entry->urls)) {
+                       foreach($entry->urls as $url) {
+                               if($url->type == 'profile') {
+                                       $profile_url = $url->value;
+                                       continue;
+                               }
+                               if($url->type == 'webfinger') {
+                                       $connect_url = str_replace('acct:' , '', $url->value);
+                                       continue;
+                               }
                        }
-               } 
-               foreach($entry->photos as $photo) {
-                       if($photo->type == 'profile') {
-                               $profile_photo = $photo->value;
-                               continue;
+               }
+               if(isset($entry->photos)) { 
+                       foreach($entry->photos as $photo) {
+                               if($photo->type == 'profile') {
+                                       $profile_photo = $photo->value;
+                                       continue;
+                               }
                        }
                }
 
@@ -225,7 +229,7 @@ function count_common_friends_zcid($uid,$zcid) {
 
 }
 
-function common_friends_zcid($uid,$zcid,$start = 0, $limit = 9999,$shuffle) {
+function common_friends_zcid($uid,$zcid,$start = 0, $limit = 9999,$shuffle = false) {
 
        if($shuffle)
                $sql_extra = " order by rand() ";