Skip to content

Commit

Permalink
Merge branch 'master' into PHRAS-4078_ExpiringRight-to-core
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaillat authored Jul 17, 2024
2 parents ee92622 + 0d970a2 commit 7cd3bac
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/Alchemy/Phrasea/Border/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7cd3bac

Please sign in to comment.