Permalink
Browse files

Don't show error message when updating a custom field without changin…

…g its value. see #10254 for 2.8.1

git-svn-id: http://svn.automattic.com/wordpress/branches/2.8@11645 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
ryan
ryan committed Jun 26, 2009
1 parent cdccf9c commit 85c711e5e79f28e8d80e5f225fd75a4c41132575
Showing with 4 additions and 2 deletions.
  1. +4 −2 wp-admin/admin-ajax.php
View
@@ -814,8 +814,10 @@ function _wp_ajax_delete_comment_response( $comment_id ) {
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 ) )
die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
if ( $meta->meta_value != stripslashes($value) ) {
if ( !$u = update_meta( $mid, $key, $value ) )
die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
}
$key = stripslashes($key);
$value = stripslashes($value);

0 comments on commit 85c711e

Please sign in to comment.