diff --git a/lib/Alchemy/Phrasea/Border/Manager.php b/lib/Alchemy/Phrasea/Border/Manager.php index de52ea8878..001974d863 100644 --- a/lib/Alchemy/Phrasea/Border/Manager.php +++ b/lib/Alchemy/Phrasea/Border/Manager.php @@ -31,6 +31,7 @@ use Alchemy\Phrasea\Model\Entities\LazaretCheck; use Alchemy\Phrasea\Model\Entities\LazaretFile; use Alchemy\Phrasea\Model\Entities\LazaretSession; +use Exception; use PHPExiftool\Driver\Metadata\Metadata; use PHPExiftool\Driver\Value\Mono as MonoValue; use PHPExiftool\Driver\Value\Multi; @@ -445,11 +446,16 @@ protected function createLazaret(File $file, Visa $visa, LazaretSession $session */ protected function addMediaAttributes(File $file) { - $metadataCollection = $this->app['phraseanet.metadata-reader']->read($file->getMedia()); + try { + $metadataCollection = $this->app['phraseanet.metadata-reader']->read($file->getMedia()); - array_walk($metadataCollection, function (Metadata $metadata) use ($file) { - $file->addAttribute(new MetadataAttr($metadata)); - }); + array_walk($metadataCollection, function (Metadata $metadata) use ($file) { + $file->addAttribute(new MetadataAttr($metadata)); + }); + } + catch (Exception $e) { + // ingore + } return $this; }