ProcessCheckResultCommandForm: Fix `Variable '$object' is probably undefined`

This commit is contained in:
Sukhwinder Dhillon 2023-08-16 10:29:36 +02:00 committed by raviks789
parent 3db461ed62
commit 4341a32c1f
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class ProcessCheckResultCommandForm extends ObjectsCommandForm
*/
public function createElements(array $formData)
{
$object = null;
foreach ($this->getObjects() as $object) {
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
// Nasty, but as getObjects() returns everything but an object with a real