IcingaObjectInspection: deal with CheckResults...

...without a command property

fixes #1402
This commit is contained in:
Thomas Gelf 2018-02-21 11:33:19 +01:00
parent 5149f05d74
commit bd40160391
1 changed files with 4 additions and 2 deletions

View File

@ -48,10 +48,12 @@ class IcingaObjectInspection extends BaseElement
{
$this->add(Html::tag('h2', null, $this->translate('Last Check Result')));
$this->renderCheckResultDetails($result);
if (property_exists($result, 'command') && is_array($result->command)) {
$this->renderExecutedCommand($result->command);
}
}
protected function renderExecutedCommand($command)
protected function renderExecutedCommand(array $command)
{
$command = implode(' ', array_map('escapeshellarg', $command));
$this->add([