From 3d168f61507bae65b3c8660f8b7245bbc70f318d Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Tue, 30 Aug 2022 01:02:46 +0000 Subject: [PATCH] Editor: Ensure that `timezone.offset` passed to `@wordpress/date` is a float Fixes inconsistent type of `timezone.offset` passed to `@wordpress/date`. It should always be a float, never a string. Props talldanwp. Fixes #56459. git-svn-id: https://develop.svn.wordpress.org/trunk@53956 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/script-loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 4bac8ccf4215d..866ca54e2dacc 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -416,7 +416,7 @@ function wp_default_packages_inline_scripts( $scripts ) { 'datetimeAbbreviated' => __( 'M j, Y g:i a' ), ), 'timezone' => array( - 'offset' => get_option( 'gmt_offset', 0 ), + 'offset' => (float) get_option( 'gmt_offset', 0 ), 'string' => $timezone_string, 'abbr' => $timezone_abbr, ),