Update destination_edit.php

This commit is contained in:
FusionPBX 2019-11-11 09:59:39 -07:00 committed by GitHub
parent a33e5b2e02
commit a991c057ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -661,8 +661,10 @@
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$destination_context);
$cache->delete("dialplan:".$destination_context.":".$destination_number);
if (isset($destination_prefix)) {
if (isset($destination_number) && is_numeric($destination_number)) {
$cache->delete("dialplan:".$destination_context.":".$destination_number);
}
if (isset($destination_prefix) && is_numeric($destination_prefix) && isset($destination_number) && is_numeric($destination_number)) {
$cache->delete("dialplan:".$destination_context.":".$destination_prefix.$destination_number);
}
}