From 4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 29 Sep 2021 21:47:12 +0200 Subject: revise content import/export part 2 --- boot.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'boot.php') diff --git a/boot.php b/boot.php index cdba24f25..2145b30b1 100644 --- a/boot.php +++ b/boot.php @@ -1441,9 +1441,12 @@ function os_mkdir($path, $mode = 0777, $recursive = false) { */ function rrmdir($path) { if(is_dir($path) === true) { - $files = array_diff(scandir($path), array('.', '..')); - foreach($files as $file) { - rrmdir(realpath($path) . '/' . $file); + $dir_entries = scandir($path); + if (is_array($dir_entries)) { + $files = array_diff($dir_entries, array('.', '..')); + foreach($files as $file) { + rrmdir(realpath($path) . '/' . $file); + } } return rmdir($path); } -- cgit v1.2.3