Use key(). Props scribu. fixes #18975
git-svn-id: https://develop.svn.wordpress.org/trunk@19095 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4399cf7610
commit
3ca9c1df61
|
@ -860,8 +860,7 @@ case 'add-meta' :
|
|||
'supplemental' => array('postid' => $pid)
|
||||
) );
|
||||
} else { // Update?
|
||||
$var_by_ref = array_keys( $_POST['meta'] );
|
||||
$mid = (int) array_pop( $var_by_ref );
|
||||
$mid = (int) key( $_POST['meta'] );
|
||||
$key = stripslashes( $_POST['meta'][$mid]['key'] );
|
||||
$value = stripslashes( $_POST['meta'][$mid]['value'] );
|
||||
if ( '' == trim($key) )
|
||||
|
|
Loading…
Reference in New Issue