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.

git-svn-id: https://develop.svn.wordpress.org/trunk@57372 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Jan 28, 2024
1 parent c786aa8 commit e108d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/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

0 comments on commit e108d27

Please sign in to comment.