Make WordPress Core

Ticket #45299: 45299.diff

File 45299.diff, 593 bytes (added by spacedmonkey, 6 years ago)
  • src/wp-includes/wp-db.php

     
    25442544
    25452545                $new_array = array();
    25462546                // Extract the column values
    2547                 for ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ ) {
    2548                         $new_array[ $i ] = $this->get_var( null, $x, $i );
     2547                if ( $this->last_result ) {
     2548                        for ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ ) {
     2549                                $new_array[ $i ] = $this->get_var( null, $x, $i );
     2550                        }
    25492551                }
    25502552                return $new_array;
    25512553        }