[wp-trac] [WordPress Trac] #56490: wp-cron.php using count() on null

WordPress Trac noreply at wordpress.org
Thu Sep 1 16:47:36 UTC 2022


#56490: wp-cron.php using count() on null
--------------------------+-----------------------------
 Reporter:  Bishoy.A      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  6.0.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 WE're using PHP 8.0 and the latest version of WordPress (6.0.2), we tried
 with all plugins disabled and the default theme enabled and we're having
 this fatal error happening every minute:

 {{{
 PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be
 of type Countable|array, null given in wp-includes/class-wp-hook.php:292
 }}}

 Here's the stack trace:

 {{{
 #2 wp-cron.php(138): do_action_ref_array('wp_privacy_dele...', NULL)","Thu
 Sep 01 2022 18:37:06 GMT+0200 (Eastern European Standard Time)"
 #1 plugin.php(524): WP_Hook->do_action(NULL)","Thu Sep 01 2022 18:37:06
 GMT+0200 (Eastern European Standard Time)"
 #0 /nas/content/live/bbgsstaging/wp-includes/class-wp-hook.php(331):
 WP_Hook->apply_filters('', NULL)","Thu Sep 01 2022 18:37:06 GMT+0200
 (Eastern European Standard Time)"
 }}}


 It looks like the default WordPress core hook
 "wp_privacy_delete_old_export_files" is causing this error. We excluded
 this hook but then "wp_version_check" caused the same fatal error.

 This issue also happens when on PHP 7.4, but on 7.4 it's just a warning,
 but it's also occurring. We're happy to provide additional information or
 access to our staging site if needed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56490>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list