X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffoaf.php;h=ee6ef85ef63e464883aee199332a9e6c4985d936;hb=b0dfc70a54e5e184023ed982dfaf5439041e9708;hp=7f76c222cb29951405c0675893c8dea45f8b5b08;hpb=a7e748479c273ddecfe9fdbd72670fe1abe766bf;p=quix0rs-gnu-social.git diff --git a/actions/foaf.php b/actions/foaf.php index 7f76c222cb..ee6ef85ef6 100644 --- a/actions/foaf.php +++ b/actions/foaf.php @@ -146,11 +146,13 @@ class FoafAction extends Action $this->elementStart('img'); $this->elementStart('Image', array('rdf:about' => $avatar->url)); foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) { - $scaled = $this->profile->getAvatar($size); - if (!$scaled->original) { // sometimes the original has one of our scaled sizes + try { + $scaled = Avatar::getOriginal($this->profile); $this->elementStart('thumbnail'); $this->element('Image', array('rdf:about' => $scaled->url)); $this->elementEnd('thumbnail'); + } catch (Exception $e) { + // This avatar did not exist } } $this->elementEnd('Image');