|
@@ -62,7 +62,7 @@ class DHCPOptionsSubscriber implements EventSubscriber
|
|
|
$rtr = array();
|
|
|
$mtaOptions = $cpeOptions = '';
|
|
|
foreach (preg_split("|\n|", $config) as $line) {
|
|
|
- $p = preg_split("|\s+|",$line);
|
|
|
+ $p = preg_split("|\s+|", trim($line));
|
|
|
if (trim($line) === "") continue;
|
|
|
if ($p[0] === "option") {
|
|
|
if ($p[1] === "routers") {
|
|
@@ -141,7 +141,7 @@ class DHCPOptionsSubscriber implements EventSubscriber
|
|
|
if ($cpeOptions != '' && is_null($cpeHost)) {
|
|
|
$cpeHost = new Host();
|
|
|
$cpeHost->setHost($entity);
|
|
|
- $mtaHost->setHostType($cpeHostType);
|
|
|
+ $cpeHost->setHostType($cpeHostType);
|
|
|
$cpeHost->setOptions($cpeOptions);
|
|
|
|
|
|
if ($validator->validate($cpeHost)->count() == 0) {
|