Skip to content

Conversation

@kruisdraad
Copy link

array_key_exists on objects is depricated and removed in php 7.4. Therefor i need to change this into an array, this quick hack makes it 7.4 compatible!

array_key_exists on objects is depricated and removed in php 7.4. Therefor i need to change this into an array, this quick hack makes it 7.4 compatible!
@marknl
Copy link
Owner

marknl commented Jun 28, 2020

Thanks for the heads-up, I'm wondering why I didn't just use property_exists in there. Can you test with that?

if (property_exists($this, 'value')) {

https://www.php.net/manual/en/function.property-exists.php

@kruisdraad
Copy link
Author

because it ws the best fix that i could think of. I am working on other packages that are more urgent to test atm (for speed i am currently using abuseio/iodef so i could continue coding)

i dont know how both handle nesting though

@marknl
Copy link
Owner

marknl commented Jun 29, 2020

I'm using the same property_exists in code above, can't see this shouldn't work. Can you make a new PR with it so i can merge that one?

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.

2 participants