Skip to content

Commit 0392507

Browse files
authored
Fix PHP 8.5 deprecations: (#10)
Deprecated: Using null as an array offset is deprecated, use an empty string instead
1 parent f8debd4 commit 0392507

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ComponentModel/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function addComponent(IComponent $component, ?string $name, ?string $inse
6565
// user checking
6666
$this->validateChildComponent($component);
6767

68-
if (isset($this->components[$insertBefore])) {
68+
if ($insertBefore !== null && isset($this->components[$insertBefore])) {
6969
$tmp = [];
7070
foreach ($this->components as $k => $v) {
7171
if ((string) $k === $insertBefore) {

0 commit comments

Comments
 (0)