Skip to content

Commit b8c9375

Browse files
Using null as an array offset is deprecated
1 parent 8025a75 commit b8c9375

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

library/Reporting/Web/Forms/ReportForm.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ protected function assemble(): void
155155
'required' => true,
156156
'class' => 'autosubmit',
157157
'label' => $this->translate('Timeframe'),
158-
'options' => [null => $this->translate('Please choose')] + Database::listTimeframes(),
158+
'options' => ['' => $this->translate('Please choose')] + Database::listTimeframes(),
159159
'description' => $this->translate(
160160
'Specifies the time frame in which this report is to be generated'
161161
)
162162
]);
163163

164164
$this->addElement('select', 'template', [
165165
'label' => $this->translate('Template'),
166-
'options' => [null => $this->translate('Please choose')] + Database::listTemplates(),
166+
'options' => ['' => $this->translate('Please choose')] + Database::listTemplates(),
167167
'description' => $this->translate(
168168
'Specifies the template to use when exporting this report to pdf. (Default Icinga template)'
169169
)
@@ -173,7 +173,7 @@ protected function assemble(): void
173173
'required' => true,
174174
'class' => 'autosubmit',
175175
'label' => $this->translate('Report'),
176-
'options' => [null => $this->translate('Please choose')] + $this->listReports(),
176+
'options' => ['' => $this->translate('Please choose')] + $this->listReports(),
177177
'description' => $this->translate('Specifies the type of the reportlet to be generated')
178178
]);
179179

library/Reporting/Web/Forms/ScheduleForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected function assemble()
8989
$this->addElement('select', 'action', [
9090
'required' => true,
9191
'class' => 'autosubmit',
92-
'options' => array_merge([null => $this->translate('Please choose')], $this->listActions()),
92+
'options' => array_merge(['' => $this->translate('Please choose')], $this->listActions()),
9393
'label' => $this->translate('Action'),
9494
'description' => $this->translate('Specifies an action to be triggered by the scheduler')
9595
]);

library/Reporting/Web/Forms/TemplateForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ protected function addColumnSettings($name, $label)
254254
'class' => 'autosubmit',
255255
'label' => $label,
256256
'options' => [
257-
null => 'None',
257+
'' => 'None',
258258
'text' => 'Text',
259259
'image' => 'Image',
260260
'variable' => 'Variable'

0 commit comments

Comments
 (0)