Skip to content

Conversation

@Vincz
Copy link
Contributor

@Vincz Vincz commented Dec 20, 2022

Q A
Branch? 6.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #48726
License MIT

Fix objects reading with path like x?.y so reading should stop and return null if the property x is null.
Currently, the system tries to read the property y from the null value and raises an exception.

@nicolas-grekas
Copy link
Member

Thank you @Vincz.

nicolas-grekas added a commit that referenced this pull request Dec 23, 2022
This PR was squashed before being merged into the 6.2 branch.

Discussion
----------

[PropertyAccess] Fix nullsafe chain like x?.y

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #48726
| License       | MIT

Fix objects reading with path like `x?.y` so reading should stop and return `null` if the property `x` is null.
Currently, the system tries to read the property `y` from the `null` value and raises an exception.

Commits
-------

92db003 [PropertyAccess] Fix nullsafe chain like x?.y
@fabpot fabpot mentioned this pull request Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants