WordPress.org

Make WordPress Core

Changeset 11645


Ignore:
Timestamp:
06/26/09 06:20:27 (6 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.8/wp-admin/admin-ajax.php

    r11512 r11645  
    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.