From 1d55913400cdaf1e5f4350ffcce92eca297f393a Mon Sep 17 00:00:00 2001 From: noisysocks Date: Tue, 30 Aug 2022 01:04:12 +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. Built from https://develop.svn.wordpress.org/trunk@53956 git-svn-id: http://core.svn.wordpress.org/trunk@53515 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/script-loader.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 4bac8ccf42..866ca54e2d 100644 --- a/wp-includes/script-loader.php +++ b/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, ), diff --git a/wp-includes/version.php b/wp-includes/version.php index f696d1157a..ccdbdb6578 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53955'; +$wp_version = '6.1-alpha-53956'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.