Fix fatal error issue in in_array function#445
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
|
Would you be up for adding a test for this as well? Please also update the branch by merging the latest changes from the main branch |
|
Hmm now there are some changes from |
|
@itsmekopila friendly ping 👋 would you be able to address the diff issues and add some tests? |
I'm setting up WP-CLI tests locally to run tests and will fix diff issues. |
|
Hi @swissspidy, Could you please guide me on how to set up the database and connect it properly to run Behat? I followed the WP CLI tests guide but ran into some issues. It seems like I wasn't able to connect the database correctly. When I run the Could you please guide me through the setup and testing process from the start? Thanks in advance! |
|
Since you're using MariaDB, I'd suggest running We just merged some MariaDB-related improvements on Friday to make running tests more robust. Then Using SQLite is a nice workaround though, then you don't need to run |
|
@itsmekopila Looking at the error you've posted, I can see that the script detected MySQL v10.4, which seems to be a bug in the script. I'll check to find out what is going on. I'm assuming you're using MariaDB v10.4. |
|
@schlessera FYI we improved the db type detection quite a bit recently, see wp-cli/wp-cli-tests#246 |
|
This is what I think is the problem here: wp-cli/wp-cli-tests#251 You have the |



Fix: #429
A fatal error occurred in the in_array function when the site options auto_update_plugins and auto_update_themes were set to string values. I fixed this by adding a condition to check if they are not arrays.