hassankhan / config

Config is a lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files
MIT License
971 stars 136 forks source link

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

Open omniError opened 1 year ago

omniError commented 1 year ago

fixes #159

DavidePastore commented 1 year ago

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

omniError commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@DavidePastore did you need anything else?