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
public function isEnabled()
{
$enabled_zones = 0 ;
foreach ($this->config->object()->captiveportal->children() as $cpzonename => $zone) {
if (isset($zone->enable)) {
$enabled_zones++;
$conf = $this->config->object();
if (isset($conf->captiveportal)) {
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