diff options
author | Mario Vavti <mario@mariovavti.com> | 2021-09-29 21:47:12 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2021-09-29 21:47:12 +0200 |
commit | 4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3 (patch) | |
tree | c2f3b62d4b0e1290e27b05de91574310c4f3832c /boot.php | |
parent | 5eb79bd51efbd69d297bbd6f46ee9d1583ec694e (diff) | |
download | volse-hubzilla-4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3.tar.gz volse-hubzilla-4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3.tar.bz2 volse-hubzilla-4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3.zip |
revise content import/export part 2
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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); } |