[wp-trac] [WordPress Trac] #24933: update_metadata() returns true even if meta value not updated

WordPress Trac noreply at wordpress.org
Mon Sep 23 18:45:11 UTC 2013


#24933: update_metadata() returns true even if meta value not updated
------------------------------+-----------------------
 Reporter:  jdgrimes          |       Owner:  nacin
     Type:  defect (bug)      |      Status:  accepted
 Priority:  normal            |   Milestone:  3.7
Component:  General           |     Version:  3.6
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------

Comment (by ocean90):

 [attachment:24933.diff​] looks good so far.

 I was just a bit confused by  `wp_cache_set( $option, $_value, 'options'
 );` vs. `wp_cache_set( $option, $newvalue, 'options' );`.  In 24933.diff​
 `$_value` is the sanitized value now. I'm fine with that, but in
 `update_option()` `$newvalue` still represents the sanitized value. So I
 changed that in [attachment:24933.2.diff​] to be consistent and less
 confusing.

 Maybe we should also rename `$newvalue` to `$value` to be consistent with
 `update_site_option()` (Or vice versa).

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24933#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list