Bugfix, Folder not found although existent in global module.

This commit is contained in:
Lewin Probst 2019-08-03 19:45:26 +02:00
parent 8cfe4a8693
commit a8f493fc34

View file

@ -79,6 +79,13 @@ return new class extends Lewp\Module
]);
// all images in the folder
$gallery_filenames = scandir($gallery_folder);
// check if folder is empty or not available
if (
($gallery_filenames === false)
|| (sizeof($gallery_filenames) == 2)
) {
continue;
}
foreach ($gallery_filenames as $image) {
if ($image === '..' || $image === '.') {
continue;