Make WordPress Core


Ignore:
Timestamp:
02/18/2026 04:38:42 AM (6 months ago)
Author:
westonruter
Message:

Customize: Ensure WP_Customize_Setting::update() and subclass overrides return consistent types.

This addresses PHPStan type check issues.

Developed in https://github.com/WordPress/wordpress-develop/pull/10952

Props westonruter, peterwilsoncc, justlevine.
See #64238, #61175.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-header-image-setting.php

    r61433 r61670  
    2929        /**
    3030         * @since 3.4.0
     31         * @since 7.0.0 Return type updated from void to true for compatibility with base class.
    3132         *
    3233         * @global Custom_Image_Header $custom_image_header
    3334         *
    3435         * @param mixed $value The value to update.
     36         * @return true Always returns true.
    3537         */
    3638        public function update( $value ) {
     
    5961                        $custom_image_header->set_header_image( $value );
    6062                }
     63                return true;
    6164        }
    6265}
Note: See TracChangeset for help on using the changeset viewer.