[wp-trac] [WordPress Trac] #13350: update_metadata() updates unchanged values

WordPress Trac wp-trac at lists.automattic.com
Thu Jun 17 16:53:10 UTC 2010


#13350: update_metadata() updates unchanged values
--------------------------+-------------------------------------------------
 Reporter:  ryan          |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  high          |    Milestone:  3.0     
Component:  Optimization  |      Version:  3.0     
 Severity:  normal        |   Resolution:          
 Keywords:  has-patch     |  
--------------------------+-------------------------------------------------
Changes (by jayarjo):

  * keywords:  => has-patch
  * priority:  normal => high
  * status:  closed => reopened
  * resolution:  fixed =>
  * version:  => 3.0


Comment:

 Stumbled upon a defect, which brought me to exactly this piece of code (my
 plugin stopped working after upgrade to WP 3.0 RC2 from 2.9.2). I store
 multi-dimensional hybrid array (associative array with some values being
 indexed arrays) as a post meta, and for some reason == operator fails to
 check equality of prev and new values (no idea why, I haven't heard of
 such either, quick googling haven't brought any results, but it fails for
 sure).

 The quick fix for this would probably be doing serialize first followed by
 equality check.

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


More information about the wp-trac mailing list