]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Once again, notices ... (#5535)
[friendica.git] / src / Model / Profile.php
index 15ad83ed85f60dd916ff528c6fb27a7afd497af0..9d1b002a7911ac5a53294b08f584e1853b69e02a 100644 (file)
@@ -20,10 +20,10 @@ use Friendica\Model\Contact;
 use Friendica\Protocol\Diaspora;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
+use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Temporal;
 
 require_once 'include/dba.php';
-require_once 'mod/proxy.php';
 
 class Profile
 {
@@ -116,6 +116,10 @@ class Profile
                        return;
                }
 
+               if (empty($pdata)) {
+                       $pdata = ['uid' => 0, 'profile_uid' => 0, 'is-default' => false,'name' => $nickname];
+               }
+
                // fetch user tags if this isn't the default profile
 
                if (!$pdata['is-default']) {
@@ -491,7 +495,7 @@ class Profile
                }
 
                if (isset($p['photo'])) {
-                       $p['photo'] = proxy_url($p['photo'], false, PROXY_SIZE_SMALL);
+                       $p['photo'] = ProxyUtils::proxifyUrl($p['photo'], false, ProxyUtils::SIZE_SMALL);
                }
 
                $p['url'] = Contact::magicLink(defaults($p, 'url', $profile_url));