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

git-svn-id: https://develop.svn.wordpress.org/trunk@7509 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-03-25 01:42:38 +00:00
parent 500e630afc
commit 9a45f73814
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']) )