[wp-trac] [WordPress Trac] #51196: PHP warning at every pageload form cron

WordPress Trac noreply at wordpress.org
Mon Aug 31 10:11:50 UTC 2020


#51196: PHP warning at every pageload form cron
--------------------------+------------------------------
 Reporter:  opajaap       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+------------------------------

Comment (by opajaap):

 The log says:
 Obs: on:31.08.2020 09:58:51: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:58:49: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:58:42: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:58:40: cron-job: CRONS: array ( 0 => false,
 1598867904 => array ( 'wp_privacy_delete_old_export_files' => array (
 '40cd750bba9870f18aada2478b24840a' => array ( 'schedule' => 'hourly',
 'args' => array ( ), 'interval' => 3600, ), ), ), )
 Obs: on:31.08.2020 09:58:23: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:58:06: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:58:00: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:57:56: cron-job: CRONS: array ( 0 => false, )
 Obs: on:31.08.2020 09:57:51: cron-job: CRONS: array ( 0 => false, )

 So $crons has often one element, being false rather than an array, as
 expected.

 Maybe _get_cron_array() should sanitize the value returned by get_option(
 'cron' );

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51196#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list