Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/19/2017 03:25:37 AM (7 years ago)
Author:
johnjamesjacoby
Message:

in_array(): be strict whenever possible.

Use wp_parse_id_list() on certain array values to ensure proper results.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/functions.php

    r6400 r6415  
    138138
    139139    // Post is not a topic or reply, return
    140     if ( ! in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) ) ) {
     140    if ( ! in_array( $data['post_type'], array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ), true ) ) {
    141141        return $data;
    142142    }
     
    14081408
    14091409    // Noop if WP core supports this already
    1410     if ( in_array( 'post_parent__in', $wp->private_query_vars ) ) {
     1410    if ( in_array( 'post_parent__in', $wp->private_query_vars, true ) ) {
    14111411        return $where;
    14121412    }
Note: See TracChangeset for help on using the changeset viewer.