From: Vincent Vanwaelscappel Date: Thu, 21 Oct 2021 12:58:09 +0000 (+0200) Subject: done #4806 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5fab3991f2f65e1e3fa8e11559eabbfa36ce3ab4;p=odl.git done #4806 @0.5 --- diff --git a/app/Jobs/ProcessFluidbook.php b/app/Jobs/ProcessFluidbook.php index 402b066..3bbf098 100644 --- a/app/Jobs/ProcessFluidbook.php +++ b/app/Jobs/ProcessFluidbook.php @@ -71,7 +71,7 @@ class ProcessFluidbook extends Compiler throw new \Exception('L\'élement ' . $id . ' n\'existe pas dans la médiathèque'); } $collection = $asset->getMediaInField($asset->getAttributeValue('file_upload')); - if ($collection->count() === 0) { + if ((is_array($collection) && count($collection) === 0) || $collection->count() === 0) { throw new \Exception('L\'élement ' . $id . ' de la médiathèque ne contient aucun fichier'); } return $collection;