Commit 1b27cd3
committed
bug #1083 Fix "null as array offset" deprecation in DockerComposeConfigurator (GromNaN)
This PR was merged into the 2.x branch.
Discussion
----------
Fix "null as array offset" deprecation in DockerComposeConfigurator
Fix #1079
## Summary
PHP 8.5 introduces a deprecation notice when `null` is used as an array offset:
> Using null as an array offset is deprecated, use an empty string instead
In `configureDockerCompose()`, `$node` is initialized to `null` and used as an array key in `$endAt[$node]` before being assigned — once at the first top-level key encounter during the parsing loop, and once after the loop when the file is empty (e.g. a freshly created `compose.yaml`).
## Fix
Guard both `$endAt[$node]` assignments with `null !== $node` checks, since there is no previous section to record an end position for.
Commits
-------
69e556f Fix "null as array offset" deprecation in DockerComposeConfigurator0 file changed
0 commit comments