Make WordPress Core


Ignore:
Timestamp:
01/28/2024 09:33:00 PM (4 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/blocks.php

    r57355 r57372  
    785785    }
    786786
    787     if ( in_array( $hooked_block_type, $anchor_block['attrs']['metadata']['ignoredHookedBlocks'] ) ) {
     787    if ( in_array( $hooked_block_type, $anchor_block['attrs']['metadata']['ignoredHookedBlocks'], true ) ) {
    788788        return '';
    789789    }
Note: See TracChangeset for help on using the changeset viewer.