From 3eb258c7ea4b1596f0a603800e70f2bd589c9d44 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 19 Jul 2022 09:52:34 -0600 Subject: [PATCH] Add an alternative method to get the device vendor. --- app/devices/device_edit.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 4fbbc5e25b..fef01abfd1 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -526,8 +526,14 @@ //use the mac address to get the vendor if (strlen($device_vendor) == 0) { - $template_array = explode("/", $device_template); + //get the device vendor using the mac address $device_vendor = device::get_vendor($device_mac_address); + + //if the vendor was not found using the mac address use an alternative method + if (strlen($device_vendor) == 0) { + $template_array = explode("/", $device_template); + $device_vendor = $template_array[0]; + } } //set the sub array index