Skip to content

Fix: Prevent using null as array offset in Package/PHP/Web - #228

Merged
Girgias merged 2 commits into
php:masterfrom
lacatoire:fix/issue-227-null-offset
Jan 11, 2026
Merged

Girgias merged 2 commits into
php:masterfrom
lacatoire:fix/issue-227-null-offset

Conversation

@lacatoire

Copy link
Copy Markdown
Member

Addresses the deprecation warning/error related to attempting to use a null value as an array.

This was primarily fixed in phpdotnet/phd/Package/PHP/Web.php by using ($this->property ?? []) to ensure that the array access operator ([]) is always applied to a valid array, thus resolving the issues experienced with modern PHP versions (7.4+).

Fixes #227

@plusminmax

Copy link
Copy Markdown

Please pardon my english, since it is not my default tongue.
If sourceInfo return null
then setup source is null
thus setup source path access on null.

@Girgias Girgias linked an issue Jan 11, 2026 that may be closed by this pull request
@Girgias
Girgias merged commit 9138441 into php:master Jan 11, 2026
9 checks passed
@lacatoire
lacatoire deleted the fix/issue-227-null-offset branch January 12, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using null as an array offset is deprecated

3 participants