ImageFile should not have an $id set if not a File

This commit is contained in:
Mikael Nordfeldth 2015-03-10 23:52:50 +01:00
parent 3302067aad
commit 88411fb1ca

View File

@ -160,7 +160,7 @@ class Profile extends Managed_DataObject
return $this->getGroup()->setOriginal($filename);
}
$imagefile = new ImageFile($this->id, Avatar::path($filename));
$imagefile = new ImageFile(null, Avatar::path($filename));
$avatar = new Avatar();
$avatar->profile_id = $this->id;