Make WordPress Core

Ticket #54906: 54906.diff

File 54906.diff, 610 bytes (added by kapilpaul, 3 years ago)

Created patch

  • src/wp-admin/includes/upgrade.php

    diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
    index 96997518a1..8c3fc97cf1 100644
    a b function upgrade_590() { 
    22732273
    22742274        if ( $wp_current_db_version < 51917 ) {
    22752275                $crons = _get_cron_array();
    2276                 // Remove errant `false` values, see #53950.
    2277                 $crons = array_filter( $crons );
    2278                 _set_cron_array( $crons );
     2276
     2277                if ( $crons && is_array( $crons ) ) {
     2278                        // Remove errant `false` values, see #53950.
     2279                        $crons = array_filter( $crons );
     2280                        _set_cron_array( $crons );
     2281                }
    22792282        }
    22802283}
    22812284