Make WordPress Core

Changeset 19095


Ignore:
Timestamp:
10/31/2011 07:46:10 PM (13 years ago)
Author:
ryan
Message:

Use key(). Props scribu. fixes #18975

File:
1 edited

Legend:

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

    r19074 r19095  
    861861        ) );
    862862    } else { // Update?
    863         $var_by_ref = array_keys( $_POST['meta'] );
    864         $mid = (int) array_pop( $var_by_ref );
     863        $mid = (int) key( $_POST['meta'] );
    865864        $key = stripslashes( $_POST['meta'][$mid]['key'] );
    866865        $value = stripslashes( $_POST['meta'][$mid]['value'] );
Note: See TracChangeset for help on using the changeset viewer.