Interfaces: Other Types: VLAN - setItemAction() loop variable issue, overlapping with requested node leading to faulty validation results.

This commit is contained in:
Ad Schellevis 2022-10-07 11:05:08 +02:00
parent 6798d9a438
commit 054a7ee834

View File

@ -91,8 +91,8 @@ class VlanSettingsController extends ApiMutableModelControllerBase
$old_vlanif = $node != null ? (string)$node->vlanif : null;
$new_vlanif = $this->generateVlanIfName($node);
$children = 0;
foreach ($this->getModel()->vlan->iterateItems() as $node) {
if ((string)$node->if == $old_vlanif) {
foreach ($this->getModel()->vlan->iterateItems() as $cnode) {
if ((string)$cnode->if == $old_vlanif) {
$children++;
}
}