diff --git wp-includes/functions.php wp-includes/functions.php
index bbc11c5..ec3cb0d 100644
--- wp-includes/functions.php
+++ wp-includes/functions.php
@@ -167,7 +167,12 @@ function date_i18n( $dateformatstring, $unixtimestamp = false, $gmt = false ) {
  */
 function number_format_i18n( $number, $decimals = 0 ) {
 	global $wp_locale;
-	$formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] );
+
+	if ( ! is_object( $wp_locale ) ) {
+		$formatted = number_format( $number, absint( $decimals ) );
+	} else {
+		$formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] );
+	}
 
 	/**
 	 * Filter the number formatted based on the locale.
