Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fatal error when root is null in has() method #160

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

omniError
Copy link

fixes #159

@DavidePastore
Copy link
Collaborator

Hi @omniError. Thanks for your PR. Could you please also include some additional tests for it?

@omniError
Copy link
Author

omniError commented Mar 12, 2023

Just eyeballing it, it looks like this test should already cover this scenario:
https://github.com/hassankhan/config/blob/develop/tests/AbstractConfigTest.php#L248

Something changed between PHP 7.4 and 8.1 to cause this. Not familiar with your CI so can't comment further.

Hold on let me dig deeper into this.

@omniError
Copy link
Author

omniError commented Mar 12, 2023

Modified test should now catch this. I think this is going to need to be a patch release for php8 compat. Don't know off the top of my head if this change happened in php 8.0 but it is certainly broken in 8.1.

@omniError
Copy link
Author

@DavidePastore did you need anything else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testing nested key ->has on unmatched structure
2 participants