mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
CustomVariables: do not count deleted vars
This commit is contained in:
parent
a3a17df437
commit
2bac3c682f
@ -22,7 +22,14 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->vars);
|
||||
$count = 0;
|
||||
foreach ($this->vars as $var) {
|
||||
if (! $var->hasBeenDeleted()) {
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function rewind()
|
||||
|
Loading…
x
Reference in New Issue
Block a user