mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Check if path exists before attempting to remove
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user