From 569a53815f94c6b146fbc170306b6dceee282883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20K?= Date: Mon, 14 Sep 2015 21:12:57 +0200 Subject: [PATCH] Fix for some server --- kernel/dbpages.class.php | 2 +- kernel/page.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)); }