Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/19/2017 03:25:37 AM (9 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/users/template.php

    r6414 r6415  
    15761576
    15771577    // Only add this if it isn't duplicated elsewhere
    1578     if ( ! in_array( $bbp->displayed_user->display_name, $public_display ) ) {
     1578    if ( ! in_array( $bbp->displayed_user->display_name, $public_display, true ) ) {
    15791579        $public_display = array( 'display_displayname' => $bbp->displayed_user->display_name ) + $public_display;
    15801580    }
     
    18701870
    18711871    // Prompt user to check their email
    1872     } elseif ( ! empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ) ) ) {
     1872    } elseif ( ! empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ), true ) ) {
    18731873
    18741874        switch ( $_GET['checkemail'] ) {
Note: See TracChangeset for help on using the changeset viewer.