[wp-trac] [WordPress Trac] #52144: the $term_ids in function wp_queue_posts_for_term_meta_lazyload is index array
WordPress Trac
noreply at wordpress.org
Tue Dec 22 08:27:05 UTC 2020
#52144: the $term_ids in function wp_queue_posts_for_term_meta_lazyload is index
array
-------------------------------------+-------------------------------------
Reporter: denishua | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.7
Component: Posts, Post Types | Version: 4.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: administration,
needs-unit-tests | coding-standards
-------------------------------------+-------------------------------------
Comment (by akabarikalpesh):
Replying to [comment:3 SergeyBiryukov]:
> Thanks for the patch, @akabarikalpesh!
>
> Just noting that we should use a strict type check for `in_array()`, see
[47550] and [47557] / #49542 for more context.
>
> This is controlled by the third parameter of
[https://www.php.net/manual/en/function.in-array.php in_array()], so the
line would look like this:
> {{{
> if ( ! in_array( $term->term_id, $term_ids, true ) ) {
> }}}
I added new .diff file. please check and let me know if any changes
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52144#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list