aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php9
1 files changed, 6 insertions, 3 deletions
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);
}