Avoid that something strange happened error. Props mdawaffe. fixes #3276

git-svn-id: http://svn.automattic.com/wordpress/trunk@4575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-12-01 12:02:30 +00:00
parent fe75b90716
commit 0bcce8aad3
1 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ case 'update-meta' :
$key = $_POST['meta'][$mid]['key'];
$value = $_POST['meta'][$mid]['value'];
if ( !$meta = get_post_meta_by_id( $mid ) )
die('0');
die('0'); // if meta doesn't exist
if ( !current_user_can( 'edit_post', $meta->post_id ) )
die('-1');
if ( $u = update_meta( $mid, $key, $value ) ) {
@ -198,7 +198,7 @@ case 'update-meta' :
) );
$x->send();
}
die('0');
die('1'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
break;
case 'add-user' :
if ( !current_user_can('edit_users') )