From e701df84c480c6b6dafcfc808ac4332bab47022e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Ll=C3=A1cer?= Date: Mon, 30 Nov 2026 14:18:30 +0100 Subject: [PATCH 1/3] Customize: Correct the types of the header image control properties. --- .../customize/class-wp-customize-header-image-control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/customize/class-wp-customize-header-image-control.php b/src/wp-includes/customize/class-wp-customize-header-image-control.php index 23018366425e9..7137768b795e9 100644 --- a/src/wp-includes/customize/class-wp-customize-header-image-control.php +++ b/src/wp-includes/customize/class-wp-customize-header-image-control.php @@ -28,7 +28,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { * Uploaded header images. * * @since 3.9.0 - * @var string + * @var array */ public $uploaded_headers; @@ -36,7 +36,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { * Default header images. * * @since 3.9.0 - * @var string + * @var array */ public $default_headers; From 79d6f3339274594494ad4047f1273f3d408c459b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Ll=C3=A1cer?= Date: Mon, 30 Nov 2026 14:24:58 +0100 Subject: [PATCH 2/3] Build/Test Tools: Remove the fixed header image control entries from the PHPStan baseline. --- tests/phpstan/baselines/assign.propertyType.neon | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/tests/phpstan/baselines/assign.propertyType.neon b/tests/phpstan/baselines/assign.propertyType.neon index a9a89163f9df1..27cf0f2954f6e 100644 --- a/tests/phpstan/baselines/assign.propertyType.neon +++ b/tests/phpstan/baselines/assign.propertyType.neon @@ -63,16 +63,6 @@ parameters: identifier: assign.propertyType count: 1 path: ../../../src/wp-includes/class-wpdb.php - - - message: '#^Property WP_Customize_Header_Image_Control\:\:\$default_headers \(string\) does not accept array\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../src/wp-includes/customize/class-wp-customize-header-image-control.php - - - message: '#^Property WP_Customize_Header_Image_Control\:\:\$uploaded_headers \(string\) does not accept array\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../src/wp-includes/customize/class-wp-customize-header-image-control.php - message: '#^Property WP_REST_Autosaves_Controller\:\:\$revisions_controller \(WP_REST_Revisions_Controller\) does not accept WP_REST_Controller\.$#' identifier: assign.propertyType From 5903288db3e5af0caf4b84e3099d8b863115003e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Ll=C3=A1cer?= Date: Wed, 2 Dec 2026 13:37:40 +0100 Subject: [PATCH 3/3] Customize: Document the header image control properties as nullable. --- .../customize/class-wp-customize-header-image-control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/customize/class-wp-customize-header-image-control.php b/src/wp-includes/customize/class-wp-customize-header-image-control.php index 7137768b795e9..12fd100bbcfd5 100644 --- a/src/wp-includes/customize/class-wp-customize-header-image-control.php +++ b/src/wp-includes/customize/class-wp-customize-header-image-control.php @@ -28,7 +28,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { * Uploaded header images. * * @since 3.9.0 - * @var array + * @var array|null */ public $uploaded_headers; @@ -36,7 +36,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { * Default header images. * * @since 3.9.0 - * @var array + * @var array|null */ public $default_headers;