forked from GNUsocial/gnu-social
[FIXTURES] Catch any exception, we don't have VIPS-related only
This commit is contained in:
parent
a7d4a56b14
commit
8c5486ba13
@ -6,6 +6,7 @@ use App\Core\DB\DB;
|
||||
use App\Core\GSFile;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
use Exception;
|
||||
use Functional as F;
|
||||
use Symfony\Component\HttpFoundation\File\File;
|
||||
|
||||
@ -21,8 +22,8 @@ class MediaFixtures extends Fixture
|
||||
$file = new File($copy_filepath, checkPath: true);
|
||||
try {
|
||||
GSFile::sanitizeAndStoreFileAsAttachment($file);
|
||||
} catch (\Jcupitt\Vips\Exception $e) {
|
||||
echo "Could not save file {$copy_filepath}\n";
|
||||
} catch (Exception $e) {
|
||||
echo "Could not save file {$copy_filepath}, failed with {$e}\n";
|
||||
}
|
||||
@unlink($copy_filepath);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user