WordPress.org

Make WordPress Core

Changeset 11644


Ignore:
Timestamp:
06/26/2009 06:19:54 AM (9 years ago)
Author:
ryan
Message:

Don't show error message when updating a custom field without changing its value. see #10254

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r11512 r11644  
    815815        if ( !current_user_can( 'edit_post', $meta->post_id ) )
    816816            die('-1');
    817         if ( !$u = update_meta( $mid, $key, $value ) )
    818             die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
     817        if ( $meta->meta_value != stripslashes($value) ) {
     818            if ( !$u = update_meta( $mid, $key, $value ) )
     819                die('0'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
     820        }
    819821
    820822        $key = stripslashes($key);
Note: See TracChangeset for help on using the changeset viewer.