Selaa lähdekoodia

Fix dhcp command

Espinoza Guillermo 6 vuotta sitten
vanhempi
commit
18acb1dda2
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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;