From d7be0a9aea1e9f48c31bbc699c2fdea059546f0d Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 30 Sep 2022 10:35:59 +1300 Subject: [PATCH] Stop slugs being cast to ints when theme is exported --- lib/compat/wordpress-6.0/class-wp-theme-json-6-0.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compat/wordpress-6.0/class-wp-theme-json-6-0.php b/lib/compat/wordpress-6.0/class-wp-theme-json-6-0.php index 878ac30c1b2c7..07820ccbd1dbe 100644 --- a/lib/compat/wordpress-6.0/class-wp-theme-json-6-0.php +++ b/lib/compat/wordpress-6.0/class-wp-theme-json-6-0.php @@ -592,7 +592,7 @@ public function get_data() { } $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 ); }