(Hosts/Services)Controller: Cannot check `ObjectList` instance with `! empty()`

This commit is contained in:
Sukhwinder Dhillon 2023-08-16 12:57:48 +02:00 committed by raviks789
parent 5d5b767afe
commit e3ce1c4b2d
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ class HostsController extends Controller
}
$acknowledgedObjects = $this->hostList->getAcknowledgedObjects();
if (! empty($acknowledgedObjects)) {
if ($acknowledgedObjects->count()) {
$removeAckForm = new RemoveAcknowledgementCommandForm();
$removeAckForm
->setObjects($acknowledgedObjects)

View File

@ -112,7 +112,7 @@ class ServicesController extends Controller
}
$acknowledgedObjects = $this->serviceList->getAcknowledgedObjects();
if (! empty($acknowledgedObjects)) {
if ($acknowledgedObjects->count()) {
$removeAckForm = new RemoveAcknowledgementCommandForm();
$removeAckForm
->setObjects($acknowledgedObjects)