aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-09-29 21:47:12 +0200
committerMario Vavti <mario@mariovavti.com>2021-09-29 21:47:12 +0200
commit4ba47698d7d0ef6c799bd0a28045c1d1e49c76f3 (patch)
treec2f3b62d4b0e1290e27b05de91574310c4f3832c /boot.php
parent5eb79bd51efbd69d297bbd6f46ee9d1583ec694e (diff)
downloadvolse-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.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);
}