Make WordPress Core

Changeset 18998


Ignore:
Timestamp:
10/18/2011 08:44:39 PM (13 years ago)
Author:
ryan
Message:

Avoid 'Only variables should be passed by reference' warnings. Reverts [18110]. see #18975

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r18937 r18998  
    861861        ) );
    862862    } else { // Update?
    863         $mid = (int) array_pop( array_keys($_POST['meta']) );
     863        $mid = (int) array_pop( $var_by_ref = array_keys($_POST['meta']) );
    864864        $key = stripslashes( $_POST['meta'][$mid]['key'] );
    865865        $value = stripslashes( $_POST['meta'][$mid]['value'] );
  • trunk/wp-admin/includes/nav-menu.php

    r18755 r18998  
    338338                the_post();
    339339                if ( 'markup' == $response_format ) {
    340                     echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( get_the_ID() ) ) ), 0, (object) $args );
     340                    echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( get_post( $var_by_ref = get_the_ID() ) ) ), 0, (object) $args );
    341341                } elseif ( 'json' == $response_format ) {
    342342                    echo json_encode(
  • trunk/wp-app.php

    r18110 r18998  
    224224    function __construct() {
    225225
    226         $this->script_name = array_pop( explode( '/', $_SERVER['SCRIPT_NAME'] ) );
     226        $this->script_name = array_pop( $var_by_ref = explode( '/', $_SERVER['SCRIPT_NAME'] ) );
    227227        $this->app_base = site_url( $this->script_name . '/' );
    228228
  • trunk/wp-includes/wp-db.php

    r18753 r18998  
    13701370            // (Duplicates are discarded)
    13711371            foreach ( $this->last_result as $row ) {
    1372                 $key = array_shift( get_object_vars( $row ) );
     1372                $key = array_shift( $var_by_ref = get_object_vars( $row ) );
    13731373                if ( ! isset( $new_array[ $key ] ) )
    13741374                    $new_array[ $key ] = $row;
Note: See TracChangeset for help on using the changeset viewer.