Commit 8d0c2d23 authored by Ad Schellevis's avatar Ad Schellevis

CP try to fix "noe no longer exists" when calling isEnabled

parent c94b5c6d
...@@ -115,9 +115,12 @@ class CPClient ...@@ -115,9 +115,12 @@ class CPClient
public function isEnabled() public function isEnabled()
{ {
$enabled_zones = 0 ; $enabled_zones = 0 ;
foreach ($this->config->object()->captiveportal->children() as $cpzonename => $zone) { $conf = $this->config->object();
if (isset($zone->enable)) { if (isset($conf->captiveportal)) {
$enabled_zones++; foreach ($conf->captiveportal->children() as $cpzonename => $zone) {
if (isset($zone->enable)) {
$enabled_zones++;
}
} }
} }
......
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