Use key(). Props scribu. fixes #18975
git-svn-id: http://svn.automattic.com/wordpress/trunk@19095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
28b1b4763d
commit
6bc11ddcfe
|
@ -860,8 +860,7 @@ case 'add-meta' :
|
||||||
'supplemental' => array('postid' => $pid)
|
'supplemental' => array('postid' => $pid)
|
||||||
) );
|
) );
|
||||||
} else { // Update?
|
} else { // Update?
|
||||||
$var_by_ref = array_keys( $_POST['meta'] );
|
$mid = (int) key( $_POST['meta'] );
|
||||||
$mid = (int) array_pop( $var_by_ref );
|
|
||||||
$key = stripslashes( $_POST['meta'][$mid]['key'] );
|
$key = stripslashes( $_POST['meta'][$mid]['key'] );
|
||||||
$value = stripslashes( $_POST['meta'][$mid]['value'] );
|
$value = stripslashes( $_POST['meta'][$mid]['value'] );
|
||||||
if ( '' == trim($key) )
|
if ( '' == trim($key) )
|
||||||
|
|
Loading…
Reference in New Issue