Fix per evitare eliminazione dell'intera cartella quando filename è vuoto

This commit is contained in:
Luca 2020-06-25 12:53:12 +02:00
parent 1ed6673ebd
commit 7a42b81a97
1 changed files with 25 additions and 24 deletions

View File

@ -250,6 +250,7 @@ class Uploads
*/
public static function delete($filename, $data)
{
if (!empty($filename)){
$database = database();
$name = $database->selectOne('zz_files', ['name'], [
@ -279,7 +280,7 @@ class Uploads
return $name;
}
}
return null;
}