#58471 closed defect (bug) (fixed)
transient variable "doing_cron" cause a fatal error when the transient value is empty
Reported by: | fzhantw | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | 6.2.2 |
Component: | Cron API | Keywords: | has-patch |
Focuses: | Cc: |
Description
In wp-includes/cron.php LINE: 855
<?php if ( $lock + WP_CRON_LOCK_TIMEOUT > $gmt_time ) { return false; }
This causes a fatal error when $lock is not an integer.
Therefore, we should make a type-checking beforehand.
Enviroment:
- WordPress 6.2.2
- PHP 8.1.19
What steps should be taken to consistently reproduce the problem?
The site randomly occurs fatal error when the transient value of "doing_cron" is empty.
Does the problem occur even when you deactivate all plugins and use the default theme?
No, I think plugin"Transients Manager 2.0.3" is related to this bug.
Attachments (1)
Change History (10)
This ticket was mentioned in PR #4560 on WordPress/wordpress-develop by fzhantw.
18 months ago
#1
- Keywords has-patch added
@peterwilsoncc commented on PR #4560:
18 months ago
#4
@fzhantw Are you able to link your GitHub account and WordPress.org profile, this swill ensure you are correctly given credit ift his PR is merged. You can link your account at https://profiles.wordpress.org/me/profile/edit/group/1/
18 months ago
#5
@fzhantw Are you able to link your GitHub account and WordPress.org profile, this swill ensure you are correctly given credit ift his PR is merged. You can link your account at https://profiles.wordpress.org/me/profile/edit/group/1/
@peterwilsoncc Sure! Linked already
16 months ago
#6
Hi, my website encountered this bug today.
I'm wondering is it possible to merge this patch into main branch?
Is there anything else I should do?
#7
@
15 months ago
- Milestone changed from Awaiting Review to 6.4
- Severity changed from major to normal
The linked pull request looks good to me.
#8
@
15 months ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 56553:
https://core.trac.wordpress.org/ticket/58471#ticket
Check the type of 'doing_cron'
If is not integer, assign it 0