From 7786e3e1b4ac8020162cf7ef8c7cf487a2f478e5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 18 Jun 2020 17:07:24 -0600 Subject: [PATCH] Add type to the destination class valid method. --- app/destinations/resources/classes/destinations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/destinations/resources/classes/destinations.php b/app/destinations/resources/classes/destinations.php index 28d492564c..a17f22cb64 100644 --- a/app/destinations/resources/classes/destinations.php +++ b/app/destinations/resources/classes/destinations.php @@ -427,6 +427,7 @@ if (!class_exists('destinations')) { } $x++; } + $this->destinations[$x]['type'] = 'array'; $this->destinations[$x]['label'] = 'other'; $this->destinations[$x]['name'] = 'dialplans'; @@ -549,8 +550,8 @@ if (!class_exists('destinations')) { /** * valid destination */ - public function valid($destination) { - $destinations = $this->all('dialplan'); + public function valid($destination, $type = 'dialplan') { + $destinations = $this->all($type); foreach($destinations as $category => $array) { if (is_array($array)) { foreach ($array as $key => $value) {