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/admin/converter.php

    r6284 r6415  
    981981
    982982                    // Doing some joining
    983                     if ( ! in_array( $item['from_tablename'], $from_tables ) && in_array( $item['join_tablename'], $from_tables ) ) {
     983                    if ( ! in_array( $item['from_tablename'], $from_tables, true ) && in_array( $item['join_tablename'], $from_tables, true ) ) {
    984984                        $from_tablename .= ' ' . $item['join_type'] . ' JOIN ' . $this->opdb->prefix . $item['from_tablename'] . ' AS ' . $item['from_tablename'] . ' ' . $item['join_expression'];
    985985                    }
     
    10411041                            // This row has a destination that matches one of the
    10421042                            // columns in this table.
    1043                             if ( in_array( $row['to_fieldname'], $tablefield_array ) ) {
     1043                            if ( in_array( $row['to_fieldname'], $tablefield_array, true ) ) {
    10441044
    10451045                                // Allows us to set default fields.
Note: See TracChangeset for help on using the changeset viewer.