index check in rows loop

This commit is contained in:
poslop
2025-12-22 12:26:37 -06:00
parent 56c9bbb224
commit cfc393d97a

View File

@@ -134,7 +134,8 @@ foreach ($rows as $r) {
$label = trim((string)($r['name'] ?? '')); $label = trim((string)($r['name'] ?? ''));
$address = trim((string)($r['extension'] ?? '')); $address = trim((string)($r['extension'] ?? ''));
$type = trim((string)("normal")); $type = trim((string)("normal"));
if ($address === '') continue;
if ($address === '' && $index > 6) continue;
$attendant->setAttribute("attendant.resourceList.{$index}.address", $address); $attendant->setAttribute("attendant.resourceList.{$index}.address", $address);
$attendant->setAttribute("attendant.resourceList.{$index}.label", $label); $attendant->setAttribute("attendant.resourceList.{$index}.label", $label);