Fix PHP warnings

This commit is contained in:
FusionPBX
2020-09-15 19:12:19 -06:00
committed by GitHub
parent 54ca294116
commit 05ba2b3ca0

View File

@@ -263,7 +263,7 @@ if (!class_exists('destinations')) {
$text2 = $language2->get($_SESSION['domain']['language']['code'], 'app/'.$name);
}
if (count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
if (is_array($row['result']['data']) && count($row['result']['data']) > 0 and strlen($row['select_value'][$destination_type]) > 0) {
$response .= " <optgroup label='".$text2['title-'.$label]."'>\n";
$label2 = $label;
foreach ($row['result']['data'] as $data) {