Coding Standards: Use strict type check for in_array() in get_hooked_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
This commit is contained in:
Sergey Biryukov
2024-01-28 21:33:00 +00:00
parent c786aa8abf
commit e108d27762

View File

@@ -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 '';
}