Only add display groups for defined buttons

Elements passed to ZendForm::addDisplayGroup will be used as array keys,
if they are null that causes a deprecation warning since PHP-8.5.
To avoid this all null values are removed.
This commit is contained in:
Bastian Lederer 2026-01-09 08:23:54 +01:00
parent 71f0ea3878
commit 5bba8ba0ec

View file

@ -130,9 +130,10 @@ abstract class QuickForm extends QuickBaseForm
)
);
$grp = array(
$this->submitButtonName ?? '',
$this->deleteButtonName ?? ''
// Add display group for defined buttons only
$grp = array_filter(
[$this->submitButtonName, $this->deleteButtonName],
fn($x) => $x !== null
);
$this->addDisplayGroup($grp, 'buttons', array(
'decorators' => array(