Skip to content

Commit

Permalink
Coding Standards: Use strict type check for in_array() in `get_hook…
Browse files Browse the repository at this point in the history
…ed_block_markup()`.

This aims to prevent type juggling causing incorrect results.

Follow-up to [57157].

Props jrf.
See #60279.
Built from https://develop.svn.wordpress.org/trunk@57372


git-svn-id: http://core.svn.wordpress.org/trunk@56878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
SergeyBiryukov committed Jan 28, 2024
1 parent 16832e2 commit 0ef6e19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ function get_hooked_block_markup( $hooked_block, $hooked_block_type, &$anchor_bl
$anchor_block['attrs']['metadata']['ignoredHookedBlocks'] = array();
}

if ( in_array( $hooked_block_type, $anchor_block['attrs']['metadata']['ignoredHookedBlocks'] ) ) {
if ( in_array( $hooked_block_type, $anchor_block['attrs']['metadata']['ignoredHookedBlocks'], true ) ) {
return '';
}

Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57371';
$wp_version = '6.5-alpha-57372';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 0ef6e19

Please sign in to comment.