浏览代码

Fix dhcp command

Espinoza Guillermo 6 年之前
父节点
当前提交
18acb1dda2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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;