Explorar o código

Fix dhcp command

Espinoza Guillermo %!s(int64=6) %!d(string=hai) anos
pai
achega
18acb1dda2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/CablemodemBundle/Command/DHCPHostCRUDCommand.php

+ 1 - 1
src/CablemodemBundle/Command/DHCPHostCRUDCommand.php

@@ -151,7 +151,7 @@ EOT
             'fixed_address' => $fixedIP ?: null,
             'fixedIP' => $fixedIP ? true : false,
         ];
-        if ($type == 'mta' || $type == 'cpe') {
+        if (isset($hostId) && ($type == 'mta' || $type == 'cpe')) {
             unset($data['mac']);
             $data['host'] = $hostId;