diff --git a/functions.php b/functions.php index f2269a64..b14b4f0b 100644 --- a/functions.php +++ b/functions.php @@ -39,6 +39,10 @@ function initials($str) { } function removeDirectory($path) { + if (!file_exists($path)) { + return; + } + $files = glob($path . '/*'); foreach ($files as $file) { is_dir($file) ? removeDirectory($file) : unlink($file); @@ -396,4 +400,4 @@ function encryptUpgradeLoginEntry($login_password_cleartext, $site_encryption_ma return $login_password_ciphertext; } -?> \ No newline at end of file +?>