mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-02 08:29:26 -05:00
Replace null as array key with an empty string
Using null as an array key is deprecated in PHP-8.5, an empty string can be used for identical behavior. This includes values that are passed to ZendForm::addDisplayGroup as elements, as they will be used as array keys.
This commit is contained in:
parent
0e11994349
commit
400ad69497
5 changed files with 6 additions and 6 deletions
|
|
@ -66,7 +66,7 @@ class BpConfigForm extends BpConfigBaseForm
|
|||
. ' this process should be retrieved from'
|
||||
),
|
||||
'multiOptions' => array(
|
||||
null => $this->translate('Use the configured default backend'),
|
||||
'' => $this->translate('Use the configured default backend'),
|
||||
) + $this->listAvailableBackends()
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class SimulationForm extends BpConfigBaseForm
|
|||
protected function enumStateNames()
|
||||
{
|
||||
$states = array(
|
||||
null => sprintf(
|
||||
'' => sprintf(
|
||||
$this->translate('Use current state (%s)'),
|
||||
$this->translate($this->node->getStateName())
|
||||
)
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ class BpConfig
|
|||
public function listInvolvedConfigs(&$configs = null)
|
||||
{
|
||||
if ($configs === null) {
|
||||
$configs[$this->getName()] = $this;
|
||||
$configs[$this->getName() ?? ''] = $this;
|
||||
}
|
||||
|
||||
foreach ($this->importedNodes as $node) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ abstract class QuickBaseForm extends Zend_Form implements ValidHtml
|
|||
$nullLabel = $this->translate('- please choose -');
|
||||
}
|
||||
|
||||
return array(null => $nullLabel) + $enum;
|
||||
return array('' => $nullLabel) + $enum;
|
||||
}
|
||||
|
||||
protected function handleOptions($options = null)
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ abstract class QuickForm extends QuickBaseForm
|
|||
);
|
||||
|
||||
$grp = array(
|
||||
$this->submitButtonName,
|
||||
$this->deleteButtonName
|
||||
$this->submitButtonName ?? '',
|
||||
$this->deleteButtonName ?? ''
|
||||
);
|
||||
$this->addDisplayGroup($grp, 'buttons', array(
|
||||
'decorators' => array(
|
||||
|
|
|
|||
Loading…
Reference in a new issue