[wp-trac] [WordPress Trac] #42069: Saving metadata fails (randomly) if equal value already exists

WordPress Trac noreply at wordpress.org
Tue Jun 26 15:45:49 UTC 2018


#42069: Saving metadata fails (randomly) if equal value already exists
-------------------------------------+-----------------------
 Reporter:  JVel                     |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.0
Component:  REST API                 |     Version:  4.8.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  rest-api
-------------------------------------+-----------------------
Changes (by flixos90):

 * keywords:  has-patch => has-patch needs-testing


Comment:

 I cannot replicate this issue unfortunately. The tests you wrote all
 passed for me without actually using the changes in the code. @dcavins
 @MattGeri @adamsilverstein Can you provide some more background on your
 environment? I wonder if it's some PHP version-related detail or similar.

 Regarding the patch, I just uploaded [attachment:42069.diff] with
 optimized tests using a data provider, which reduces the necessary code
 and at the same time tests a lot more combinations. There's one test for
 checking updating a value with exactly the same value, and another one for
 checking updating a value with another value that essentially means the
 same (like 0/1 or false/true or ''/'1' for booleans).
 My new patch only includes the tests as they passed without the code
 change. I'm not at all saying that change is wrong, it just did not fix a
 problem for me, so I excluded it ''for now''. Of course, as we determine
 where exactly this problem is coming from, we can add the fix back as
 needed. Please use the new patch going forward and iterate from there.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/42069#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list