Verified Commit acb523a1 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

🚑 fix(systems) Use new Error objects for interfacesManagement

issue #6061
parent 527ed343
......@@ -269,13 +269,13 @@ class interfacesManagement extends management implements SimpleTab
if (class_available('ipamVlan')) {
$macvlan = $baseobject->macAddress.$baseobject->fdNetworkInterfaceVlanDN;
if (isset($macvlans[$macvlan])) {
$errors[] = sprintf(_('Interfaces "%s" and "%s" use the same MAC + VLAN combination'), $macvlans[$macvlan], $baseobject->cn);
$errors[] = new SimplePluginCheckError($this, htmlescape(sprintf(_('Interfaces "%s" and "%s" use the same MAC + VLAN combination'), $macvlans[$macvlan], $baseobject->cn)));
}
$macvlans[$macvlan] = $baseobject->cn;
}
foreach ($baseobject->ipHostNumber as $ip) {
if (isset($ips[$ip])) {
$errors[] = sprintf(_('Interfaces "%s" and "%s" use the same IP address "%s"'), $ips[$ip], $baseobject->cn, $ip);
$errors[] = new SimplePluginCheckError($this, htmlescape(sprintf(_('Interfaces "%s" and "%s" use the same IP address "%s"'), $ips[$ip], $baseobject->cn, $ip)));
}
$ips[$ip] = $baseobject->cn;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment