[wp-trac] [WordPress Trac] #54998: Fatal error using admin_email_check_interval filter on PHP 8.0
WordPress Trac
noreply at wordpress.org
Sun Jan 30 15:53:54 UTC 2022
#54998: Fatal error using admin_email_check_interval filter on PHP 8.0
------------------------------------+----------------------
Reporter: josklever | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Login and Registration | Version: 5.9
Severity: minor | Resolution: invalid
Keywords: php8 | Focuses:
------------------------------------+----------------------
Changes (by johnbillion):
* keywords: => php8
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Using `0` as a callback was likely filling your PHP error logs with
warnings prior to upgrading to PHP 8, and it was coincidental that it was
working as expected. Using any other number would have resulted in the
interval being set to `0` too, due to type coercion.
I don't think there's anything to fix here, the documentation for
`add_filter()`, tutorials around the internet, and associated error
messages are clear that the second parameter must be a callable. A better
course of action would be to contact the author of the article where you
got the original code from to suggest a correction if necessary.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54998#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list