Changeset 60809
- Timestamp:
- 09/29/2025 04:28:00 PM (9 days ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-bindings.php
r60807 r60809 149 149 150 150 $supported_block_attributes = 151 $block_bindings_supported_attributes[ $block_type ] ?? 152 array(); 151 isset( $block_type, $block_bindings_supported_attributes[ $block_type ] ) ? 152 $block_bindings_supported_attributes[ $block_type ] : 153 array(); 153 154 154 155 /** -
trunk/src/wp-includes/blocks.php
r60708 r60809 939 939 function insert_hooked_blocks( &$parsed_anchor_block, $relative_position, $hooked_blocks, $context ) { 940 940 $anchor_block_type = $parsed_anchor_block['blockName']; 941 $hooked_block_types = isset( $ hooked_blocks[ $anchor_block_type ][ $relative_position ] )941 $hooked_block_types = isset( $anchor_block_type, $hooked_blocks[ $anchor_block_type ][ $relative_position ] ) 942 942 ? $hooked_blocks[ $anchor_block_type ][ $relative_position ] 943 943 : array(); … … 1030 1030 function set_ignored_hooked_blocks_metadata( &$parsed_anchor_block, $relative_position, $hooked_blocks, $context ) { 1031 1031 $anchor_block_type = $parsed_anchor_block['blockName']; 1032 $hooked_block_types = isset( $ hooked_blocks[ $anchor_block_type ][ $relative_position ] )1032 $hooked_block_types = isset( $anchor_block_type, $hooked_blocks[ $anchor_block_type ][ $relative_position ] ) 1033 1033 ? $hooked_blocks[ $anchor_block_type ][ $relative_position ] 1034 1034 : array(); -
trunk/src/wp-includes/class-wp-block-type-registry.php
r60804 r60809 135 135 * @since 5.0.0 136 136 * 137 * @param string $name Block type name including namespace.137 * @param string|null $name Block type name including namespace. 138 138 * @return WP_Block_Type|null The registered block type, or null if it is not registered. 139 139 */ … … 162 162 * @since 5.0.0 163 163 * 164 * @param string $name Block type name including namespace.164 * @param string|null $name Block type name including namespace. 165 165 * @return bool True if the block type is registered, false otherwise. 166 166 */ 167 167 public function is_registered( $name ) { 168 return isset( $ this->registered_block_types[ $name ] );168 return isset( $name, $this->registered_block_types[ $name ] ); 169 169 } 170 170 -
trunk/src/wp-includes/class-wp-hook.php
r56609 r60809 81 81 */ 82 82 public function add_filter( $hook_name, $callback, $priority, $accepted_args ) { 83 if ( null === $priority ) { 84 $priority = 0; 85 } 86 83 87 $idx = _wp_filter_build_unique_id( $hook_name, $callback, $priority ); 84 88 … … 188 192 */ 189 193 public function remove_filter( $hook_name, $callback, $priority ) { 194 if ( null === $priority ) { 195 $priority = 0; 196 } 197 190 198 $function_key = _wp_filter_build_unique_id( $hook_name, $callback, $priority ); 191 199 192 $exists = isset( $ this->callbacks[ $priority ][ $function_key ] );200 $exists = isset( $function_key, $this->callbacks[ $priority ][ $function_key ] ); 193 201 194 202 if ( $exists ) { -
trunk/src/wp-includes/class-wp-theme-json.php
r60409 r60809 2890 2890 $element_pseudo_allowed = array(); 2891 2891 2892 if ( isset( static::VALID_ELEMENT_PSEUDO_SELECTORS[ $current_element ] ) ) {2892 if ( isset( $current_element, static::VALID_ELEMENT_PSEUDO_SELECTORS[ $current_element ] ) ) { 2893 2893 $element_pseudo_allowed = static::VALID_ELEMENT_PSEUDO_SELECTORS[ $current_element ]; 2894 2894 } -
trunk/src/wp-includes/functions.php
r60776 r60809 5102 5102 * than `array_key_exists()`. 5103 5103 */ 5104 if ( isset( $ input_array[ $path_element ] ) ) {5104 if ( isset( $path_element, $input_array[ $path_element ] ) ) { 5105 5105 $input_array = $input_array[ $path_element ]; 5106 5106 continue; … … 5111 5111 * which also checks for `null` values. 5112 5112 */ 5113 if ( array_key_exists( $path_element, $input_array ) ) {5113 if ( isset( $path_element ) && array_key_exists( $path_element, $input_array ) ) { 5114 5114 $input_array = $input_array[ $path_element ]; 5115 5115 continue; -
trunk/tests/phpunit/data/html-api/token-counting-html-processor.php
r59364 r60809 24 24 } 25 25 26 if ( null === $token_name ) { 27 $token_name = ''; 28 } 29 26 30 if ( ! isset( $this->token_seen_count[ $token_name ] ) ) { 27 31 $this->token_seen_count[ $token_name ] = 1; -
trunk/tests/phpunit/tests/functions/wpArrayGet.php
r56971 r60809 239 239 true 240 240 ); 241 242 $this->assertSame(243 _wp_array_get(244 array(245 'key' => array(246 null => 4,247 ),248 ),249 array( 'key', null ),250 true251 ),252 4253 );254 241 } 255 242 -
trunk/tests/phpunit/tests/post/isPostStatusViewable.php
r57987 r60809 141 141 array( true, false ), 142 142 array( 20, false ), 143 array( null, false ),144 143 array( '', false ), 145 144 );
Note: See TracChangeset for help on using the changeset viewer.