From db85774f25d9acb7dbd6c97d8ba2ea6836c39d5d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 4 Jul 2011 12:24:59 -0400 Subject: [PATCH] only update the avatar of an Ostatus_profile if it's a profile --- plugins/OStatus/classes/Ostatus_profile.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 146784bb8a..8f27d86c8b 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -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; -- 2.39.5