Only set the device_vendor when the value is not empty

This commit is contained in:
FusionPBX 2023-06-16 13:02:47 -06:00 committed by GitHub
parent 2ee90482f1
commit 094a0f4388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -533,7 +533,7 @@
}
else {
//use the mac address to get the vendor
$device_vendor = device::get_vendor($device_mac_address);
$device_vendor = device::get_vendor($device_mac_address);
}
//determine the name
@ -599,7 +599,9 @@
$array["devices"][$j]["domain_uuid"] = $_SESSION['domain_uuid'];
$array["devices"][$j]["device_mac_address"] = $device_mac_address;
$array["devices"][$j]["device_label"] = $extension;
$array["devices"][$j]["device_vendor"] = $device_vendor;
if (!empty($device_vendor)) {
$array["devices"][$j]["device_vendor"] = $device_vendor;
}
if (!empty($device_templates[$d])) {
$array["devices"][$j]["device_template"] = $device_templates[$d];
}