Prevent an warning by using preg_quote

This accounts for special characters like a * in the value.
This commit is contained in:
FusionPBX 2023-10-25 10:41:03 -06:00 committed by GitHub
parent 57d8d52336
commit cb65e7f66e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1317,7 +1317,7 @@ if (!class_exists('xml_cdr')) {
} }
//find all other matching actions //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")) { if (file_exists($_SERVER["PROJECT_ROOT"]."/app/".$application."/app_languages.php")) {
$value['application'] = $application; $value['application'] = $application;
return $value; return $value;