Fix addition of new meta keys when no meta keys currently exist. Props DD32. fixes #6343

git-svn-id: http://svn.automattic.com/wordpress/trunk@7509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-03-25 01:42:38 +00:00
parent 064322eded
commit 48db986c36
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ case 'add-meta' :
check_ajax_referer( 'add-meta' );
$c = 0;
$pid = (int) $_POST['post_id'];
if ( isset($_POST['metakeyselect']) ) {
if ( isset($_POST['metakeyselect']) || isset($_POST['metakeyinput']) ) {
if ( !current_user_can( 'edit_post', $pid ) )
die('-1');
if ( '#NONE#' == $_POST['metakeyselect'] && empty($_POST['metakeyinput']) )