Opened 3 years ago
Closed 3 years ago
#54906 closed defect (bug) (fixed)
Check _get_cron_array type in upgrade_590 routine
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.9.1 | Priority: | normal |
Severity: | normal | Version: | 5.9 |
Component: | Upgrade/Install | Keywords: | has-patch fixed-major dev-reviewed |
Focuses: | Cc: |
Description
When the upgrade_590
DB routine is run on a site without the cron
site option, _get_cron_array
returns false which causes a TypeError when the return value is run through array_filter
.
[25-Jan-2022 21:33:45 UTC] PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given in /var/www/html/web/wp/wp-admin/includes/upgrade.php:2273
In particular, I encountered this on a local multisite network with several sites which had been created but not yet used. Running the upgrade routine worked on the sites which had been used (and thus had cron
site options) but failed on the others.
Related: #53940
Attachments (1)
Change History (13)
This ticket was mentioned in PR #2251 on WordPress/wordpress-develop by kapilpaul.
3 years ago
#3
- Keywords has-patch added
Trac ticket: [](https://core.trac.wordpress.org/ticket/54906)
#4
@
3 years ago
- Keywords commit added
- Owner set to peterwilsoncc
- Status changed from new to assigned
Thanks for the patch @kapilpaul.
The code looks good to me so I've self assigned the ticket and marked it for commit.
#7
@
3 years ago
- Keywords fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening for merging in to the 5.9 branch.
Thanks for logging this Chris, I'll look at getting a fix in for the 5.9.1 release.