From 62360f5f4b222a4db53e99cdf56df04b66421cf0 Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Fri, 30 Sep 2022 14:46:25 +0000 Subject: [PATCH] Editor: Cast `theme.json` values to `string` on theme export. Props glendaviesnz. See #56684. git-svn-id: https://develop.svn.wordpress.org/trunk@54363 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-theme-json.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php index 4f5627a790..ae214b361a 100644 --- a/src/wp-includes/class-wp-theme-json.php +++ b/src/wp-includes/class-wp-theme-json.php @@ -2841,7 +2841,7 @@ class WP_Theme_JSON { } $flattened_preset = array(); foreach ( $items as $slug => $value ) { - $flattened_preset[] = array_merge( array( 'slug' => $slug ), $value ); + $flattened_preset[] = array_merge( array( 'slug' => (string) $slug ), $value ); } _wp_array_set( $output, $path, $flattened_preset ); }