mirror of
git://develop.git.wordpress.org/
synced 2025-05-01 17:38:00 +02:00
The private `_set_cron_array()` function expects a cron array as the first parameter, but will often be passed the - potentially updated - output of a call to `_get_cron_array()`. When the `_get_cron_array()` function returns `false`, a "Deprecated: Automatic conversion of false to array is deprecated" warning will be thrown on PHP 8.1. The input validation resolves the deprecation warning by setting the cron value to an empty array when not given an `array` data type. Adds a full set of `_set_cron_array()` tests. Follow-up to [4189], [50152]. Props jrf, hellofromTonya, peterwilsoncc. See #53635. git-svn-id: https://develop.svn.wordpress.org/trunk@51695 602fd350-edb4-49c9-b593-d223f7449a82