Erreur de sortie de boucle

This commit is contained in:
fredtempez 2020-04-16 19:27:52 +02:00
parent 6393425895
commit 349e859c08
1 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ class gallery extends common {
public static $thumbs = []; public static $thumbs = [];
const GALLERY_VERSION = '2.12'; const GALLERY_VERSION = '2.13';
/** /**
@ -452,6 +452,7 @@ class gallery extends common {
$iterator = new DirectoryIterator($gallery['config']['directory']); $iterator = new DirectoryIterator($gallery['config']['directory']);
foreach($iterator as $fileInfos) { foreach($iterator as $fileInfos) {
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) { if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
self::$galleries[$galleryId] = $gallery; self::$galleries[$galleryId] = $gallery;
// L'image de couverture est-elle supprimée ? // L'image de couverture est-elle supprimée ?
if (file_exists( $gallery['config']['directory'] . '/' . $gallery['config']['homePicture'])) { if (file_exists( $gallery['config']['directory'] . '/' . $gallery['config']['homePicture'])) {
@ -476,7 +477,7 @@ class gallery extends common {
: str_replace('source','thumb',$fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename()); : str_replace('source','thumb',$fileInfos->getPath()) . '/' . strtolower($fileInfos->getFilename());
} }
} }
continue(2); continue(1);
} }
} }
} }