From b153a51cb644e05d0cafb36033372ccd116ed406 Mon Sep 17 00:00:00 2001 From: Bastian Lederer Date: Fri, 9 Jan 2026 08:35:49 +0100 Subject: [PATCH] Set BpConifg::name by a constructor argument with default A bug was caused by BpConfig::getName returning null, because the result was used as an array key, which is deprecated since PHP-8.5. To avoid any further issues the constructor now ensures the name is always set. --- library/Businessprocess/BpConfig.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/Businessprocess/BpConfig.php b/library/Businessprocess/BpConfig.php index 2aae1aa..0a54d31 100644 --- a/library/Businessprocess/BpConfig.php +++ b/library/Businessprocess/BpConfig.php @@ -133,8 +133,9 @@ class BpConfig /** @var bool Whether the config is faulty */ protected $isFaulty = false; - public function __construct() + public function __construct(string $name = 'dummy') { + $this->setName($name); } /** @@ -605,7 +606,7 @@ class BpConfig public function listInvolvedConfigs(&$configs = null) { if ($configs === null) { - $configs[$this->getName() ?? ''] = $this; + $configs[$this->getName()] = $this; } foreach ($this->importedNodes as $node) {