Same as last commit, don't give ID if it's not for a File object

This commit is contained in:
Mikael Nordfeldth 2015-03-11 00:13:55 +01:00
parent 88411fb1ca
commit 6f76c8b59d

View File

@ -244,7 +244,7 @@ class Avatar extends Managed_DataObject
$original = Avatar::getUploaded($target); $original = Avatar::getUploaded($target);
$imagefile = new ImageFile($target->id, Avatar::path($original->filename)); $imagefile = new ImageFile(null, Avatar::path($original->filename));
$filename = $imagefile->resize($width); $filename = $imagefile->resize($width);
$scaled = clone($original); $scaled = clone($original);