diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 649f086d60..f20964ead4 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -501,12 +501,17 @@ class WP_Scripts extends WP_Dependencies { ), '5.7.0' ); + + if ( false === $l10n ) { + // This should really not be needed, but is necessary for backward compatibility. + $l10n = array( $l10n ); + } } if ( is_string( $l10n ) ) { $l10n = html_entity_decode( $l10n, ENT_QUOTES, 'UTF-8' ); - } else { - foreach ( (array) $l10n as $key => $value ) { + } elseif ( is_array( $l10n ) ) { + foreach ( $l10n as $key => $value ) { if ( ! is_scalar( $value ) ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 498b9a5143..315e4b97d6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-54141'; +$wp_version = '6.1-alpha-54142'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.