]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
only update the avatar of an Ostatus_profile if it's a profile
authorEvan Prodromou <evan@status.net>
Mon, 4 Jul 2011 16:24:59 +0000 (12:24 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 4 Jul 2011 16:24:59 +0000 (12:24 -0400)
plugins/OStatus/classes/Ostatus_profile.php

index 146784bb8a2198465aa541ee81ca99ca78bc0a7f..8f27d86c8b4f83fd8bc7937ba370f9e1031801e1 100644 (file)
@@ -1045,7 +1045,10 @@ class Ostatus_profile extends Managed_DataObject
         chmod(Avatar::path($filename), 0644);
 
         $profile = $this->localProfile();
-        $profile->setOriginal($filename);
+        
+        if (!empty($profile)) {
+            $profile->setOriginal($filename);
+        }
 
         $orig = clone($this);
         $this->avatar = $url;