diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index b4f1701fe7..3b99ff848b 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -728,6 +728,10 @@ function load_textdomain( $domain, $mofile, $locale = null ) { $l10n_unloaded = (array) $l10n_unloaded; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters whether to short-circuit loading .mo file. * @@ -989,6 +993,10 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters a plugin's locale. * @@ -1037,6 +1045,10 @@ function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** This filter is documented in wp-includes/l10n.php */ $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); @@ -1076,6 +1088,10 @@ function load_theme_textdomain( $domain, $path = false ) { /** @var WP_Textdomain_Registry $wp_textdomain_registry */ global $wp_textdomain_registry; + if ( ! is_string( $domain ) ) { + return false; + } + /** * Filters a theme's locale. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 1b68a025e6..701e4cc208 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57924'; +$wp_version = '6.6-alpha-57925'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.