Skip to content

Commit

Permalink
fix: Ensure directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zooley committed Jan 12, 2024
1 parent 93245d8 commit 1ceea2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Widgets/Gallery/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1ceea2e

Please sign in to comment.