Automattic / wordbless

WorDBless allows you to use WordPress core functions in your PHPUnit tests without having to set up a database and the whole WordPress environment
Other
131 stars 6 forks source link

Fix failing test under PHP8 and provide a fallback value for string #59

Closed cezarpopa closed 2 years ago

cezarpopa commented 2 years ago

Hi,

i believe this commit should fix the CI phpunit task from failing under php 8 and also will close #55

Thank you, Cezar

szepeviktor commented 2 years ago

Now CI says

Attempt to read property "post_type" on null

cezarpopa commented 2 years ago

Now CI says

Attempt to read property "post_type" on null

This should be fixed now, the culprit was that the type of $string was int in some cases.

leogermani commented 2 years ago

Thank you @cezarpopa !