From 1ceea2e8155b89b26c42c67925f9b065577e9415 Mon Sep 17 00:00:00 2001 From: Shawn Rice Date: Fri, 12 Jan 2024 15:04:57 -0500 Subject: [PATCH] fix: Ensure directory exists --- app/Widgets/Gallery/Gallery.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Widgets/Gallery/Gallery.php b/app/Widgets/Gallery/Gallery.php index 68b21ec09..3d1bb15cc 100644 --- a/app/Widgets/Gallery/Gallery.php +++ b/app/Widgets/Gallery/Gallery.php @@ -20,6 +20,11 @@ public function run() //$folders = MediaHelper::getTree($base); $folder = $this->params->get('folder'); + + if (!is_dir(storage_path() . '/app/public' . $folder)) + { + return null; + } $children = MediaHelper::getChildren(storage_path() . '/app/public' . $folder, ''); $files = array_filter($children['files'], function ($v)