diff --git a/kernel/dbpages.class.php b/kernel/dbpages.class.php index d0f112b4..13e6279c 100644 --- a/kernel/dbpages.class.php +++ b/kernel/dbpages.class.php @@ -313,7 +313,7 @@ class dbPages extends dbJSON // Recovery pages from subdirectories $subPaths = glob($directory.DS.'*', GLOB_ONLYDIR); - foreach($subPaths as $subDirectory) + foreach((array) $subPaths as $subDirectory) { $subKey = basename($subDirectory); diff --git a/kernel/page.class.php b/kernel/page.class.php index e3dc6b85..1f45e714 100644 --- a/kernel/page.class.php +++ b/kernel/page.class.php @@ -142,7 +142,7 @@ class Page extends fileContent { $tmp = array(); $paths = glob(PATH_PAGES.$this->getField('key').DS.'*', GLOB_ONLYDIR); - foreach($paths as $path) { + foreach((array) $paths as $path) { array_push($tmp, basename($path)); }