From 5fab3991f2f65e1e3fa8e11559eabbfa36ce3ab4 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 21 Oct 2021 14:58:09 +0200 Subject: [PATCH] done #4806 @0.5 --- app/Jobs/ProcessFluidbook.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5