From e7b985a460c2887aa98662d15240027139bc69ac Mon Sep 17 00:00:00 2001 From: Diogo Peralta Cordeiro Date: Thu, 19 Aug 2021 01:44:03 +0100 Subject: [PATCH] [FIXTURES] Catch any exception, we don't have VIPS-related only --- src/DataFixtures/MediaFixtures.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DataFixtures/MediaFixtures.php b/src/DataFixtures/MediaFixtures.php index 7def5ec0d6..06b2a4bc74 100644 --- a/src/DataFixtures/MediaFixtures.php +++ b/src/DataFixtures/MediaFixtures.php @@ -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); });