CMaintenance.php / function get
if user presets 'groupids' parameter,
this function overrides 'selectGroups' parameter by value '1'
—
if (!is_null($options['groupids']))
—
so if user sets 'selectGroups' parameter (e.g.'extend') was lost..
'selectGroups' parameter is used later at calls 'addRelatedObjects' function.
this function internally calls api 'hostgroup.get',
value of 'selectGroups' is set to 'hostgroup.get' 's 'output' parameter.
Value '1' might be invalid...
value of 'output' should be 'api query settings' e.g.'extend' 'refer'...
I think as follows
if user not presets 'selectGroups' parameter, then it needs set to 'refer'
—
if (!is_null($options['groupids'])) {
if (is_null($options['selectGroups']))
}
—
There is the same issue with 'hosts' and 'selectHosts'...