Make WordPress Core

Ticket #10607: 10607.patch

File 10607.patch, 1.2 KB (added by miqrogroove, 14 years ago)

Finishes the fix, adds minimal improvements.

  • wp-includes/wp-db.php

     
    445445        var $dbuser;
    446446
    447447        /**
     448         * {@internal Missing Description}}
     449         *
     450         * @since unknown
     451         * @access public
     452         * @var unknown
     453         */
     454        var $func_call;
     455
     456        /**
    448457         * Connects to the database server and selects a database
    449458         *
    450459         * PHP4 compatibility layer for calling the PHP5 constructor.
     
    13871396                } elseif ( $output == ARRAY_A || $output == ARRAY_N ) {
    13881397                        // Return an integer-keyed array of...
    13891398                        if ( $this->last_result ) {
    1390                                 $i = 0;
    13911399                                foreach( (array) $this->last_result as $row ) {
    13921400                                        if ( $output == ARRAY_N ) {
    13931401                                                // ...integer-keyed row arrays
    1394                                                 $new_array[$i] = array_values( get_object_vars( $row ) );
     1402                                                $new_array[] = array_values( get_object_vars( $row ) );
    13951403                                        } else {
    13961404                                                // ...column name-keyed row arrays
    1397                                                 $new_array[$i] = get_object_vars( $row );
     1405                                                $new_array[] = get_object_vars( $row );
    13981406                                        }
    1399                                         ++$i;
    14001407                                }
    1401                                 return $new_array;
    14021408                        }
     1409                        return $new_array;
    14031410                }
     1411                return null;
    14041412        }
    14051413
    14061414        /**