Make WordPress Core


Ignore:
Timestamp:
08/25/2015 08:27:56 PM (9 years ago)
Author:
wonderboymusic
Message:

foreach is a statement, not a function.

See #33491.

File:
1 edited

Legend:

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

    r33718 r33734  
    841841        $incompatible_modes = (array) apply_filters( 'incompatible_sql_modes', $this->incompatible_modes );
    842842
    843         foreach( $modes as $i => $mode ) {
     843        foreach ( $modes as $i => $mode ) {
    844844            if ( in_array( $mode, $incompatible_modes ) ) {
    845845                unset( $modes[ $i ] );
     
    22502250            // Return an integer-keyed array of...
    22512251            if ( $this->last_result ) {
    2252                 foreach( (array) $this->last_result as $row ) {
     2252                foreach ( (array) $this->last_result as $row ) {
    22532253                    if ( $output == ARRAY_N ) {
    22542254                        // ...integer-keyed row arrays
     
    25952595
    25962596        // If any of the columns don't have one of these collations, it needs more sanity checking.
    2597         foreach( $this->col_meta[ $table ] as $col ) {
     2597        foreach ( $this->col_meta[ $table ] as $col ) {
    25982598            if ( empty( $col->Collation ) ) {
    25992599                continue;
     
    29452945                $i = 0;
    29462946                $new_array = array();
    2947                 foreach( (array) $this->col_info as $col ) {
     2947                foreach ( (array) $this->col_info as $col ) {
    29482948                    $new_array[$i] = $col->{$info_type};
    29492949                    $i++;
Note: See TracChangeset for help on using the changeset viewer.