Make sure the file name exists and is not empty.

This commit is contained in:
FusionPBX 2021-11-16 13:11:59 -07:00 committed by GitHub
parent 1a943e5e27
commit 74dd8b23e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ if (!class_exists('switch_recordings')) {
//delete recording files
if (is_array($filenames) && @sizeof($filenames) != 0) {
foreach ($filenames as $filename) {
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$filename)) {
if (isset($filename) && strlen($filename) > 0 && file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$filename)) {
@unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$filename);
}
}