mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 19:34:52 +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) {
|
function removeDirectory($path) {
|
||||||
|
if (!file_exists($path)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$files = glob($path . '/*');
|
$files = glob($path . '/*');
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
is_dir($file) ? removeDirectory($file) : unlink($file);
|
is_dir($file) ? removeDirectory($file) : unlink($file);
|
||||||
@@ -396,4 +400,4 @@ function encryptUpgradeLoginEntry($login_password_cleartext, $site_encryption_ma
|
|||||||
return $login_password_ciphertext;
|
return $login_password_ciphertext;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user