FileNotFoundException won't be thrown if MediaFile works as it should
In newer GNU social MediaFile will make sure the local file exists, if we're trying to upload something that matches by hash in the File table. For the current 'master' when I'm pushing this that won't be handled correctly, but then again it would only be a problem if something has been f'd already and you're missing files from the filesystem that are listed in the File table.
This commit is contained in:
parent
0e0a92638f
commit
2dbd6c539c
|
@ -101,7 +101,6 @@ class ApiUpdateAvatarAction extends ApiAuthAction
|
|||
fclose($fh);
|
||||
|
||||
// Now try to get it as an ImageFile since it has some handy functions
|
||||
// but will throw a FileNotFoundException if the file doesn't exist.
|
||||
$imagefile = ImageFile::fromFileObject($mediafile->fileRecord);
|
||||
unset($mediafile); // This isn't needed in memory.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user