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-background-image-setting.php

    r53411 r61670  
    2727        /**
    2828         * @since 3.4.0
     29         * @since 7.0.0 Return type updated from void to true for compatibility with base class.
    2930         *
    3031         * @param mixed $value The value to update. Not used.
     32         * @return true Always returns true.
    3133         */
    3234        public function update( $value ) {
    3335                remove_theme_mod( 'background_image_thumb' );
     36                return true;
    3437        }
    3538}
Note: See TracChangeset for help on using the changeset viewer.