diff --git a/wp-includes/option.php b/wp-includes/option.php index f52b7efee7..a80de70784 100644 --- a/wp-includes/option.php +++ b/wp-includes/option.php @@ -1247,7 +1247,7 @@ function get_network_option( $network_id, $option, $default = false ) { $notoptions_key = "$network_id:notoptions"; $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); - if ( isset( $notoptions[ $option ] ) ) { + if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { /** * Filters a specific default network option. @@ -1295,6 +1295,11 @@ function get_network_option( $network_id, $option, $default = false ) { } } + if ( ! is_array( $notoptions ) ) { + $notoptions = array(); + wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); + } + /** * Filters the value of an existing network option. * diff --git a/wp-includes/version.php b/wp-includes/version.php index a1b37d6c78..5a60cb8a65 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42832'; +$wp_version = '5.0-alpha-42833'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.