From cb65e7f66e6f3e16fff8ded8117c54dc15937e46 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 25 Oct 2023 10:41:03 -0600 Subject: [PATCH] Prevent an warning by using preg_quote This accounts for special characters like a * in the value. --- app/xml_cdr/resources/classes/xml_cdr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 2b3e7ebabe..4610d4551a 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -1317,7 +1317,7 @@ if (!class_exists('xml_cdr')) { } //find all other matching actions - if ($value['extension'] == $detail_action or preg_match('/^'.$value['extension'].'$/', $detail_action)) { + if (!empty($value['extension']) && $value['extension'] == $detail_action or preg_match('/^'.preg_quote($value['extension']).'$/', $detail_action)) { if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$application."/app_languages.php")) { $value['application'] = $application; return $value;