Support » Everything else WordPress » WP Bug in cron

  • See this topic:
    https://wordpress.org/support/topic/cron-errors-3/#post-13334644

    line 117 of wp-cron.php reads:

    foreach ( $cronhooks as $hook => $keys ) {

    this should read:

    if ( $cronhooks ) foreach ( $cronhooks as $hook => $keys ) {
    or:

    if ( is_array( $cronhooks ) ) foreach ( $cronhooks as $hook => $keys ) {
    

    this will prevent warning messages like:

    [Fri Aug 28 21:15:16.443167 2020] [fcgid:warn] [pid 62430] [client 77.68.64.25:32953] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /home/domains/vol3/578/2510578/user/htdocs/wp-cron.php on line 117, referer: https://www.pakohl.com/wp-cron.php?doing_wp_cron=1598645713.5858569145202636718750
    

    when $cronhooks is false

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Bug in cron’ is closed to new replies.