[wp-trac] [WordPress Trac] #22233: Multiple calls to update_option with the same array only saves the first time

WordPress Trac noreply at wordpress.org
Sat Oct 20 16:48:00 UTC 2012


#22233: Multiple calls to update_option with the same array only saves the first
time
-------------------------------+------------------------------
 Reporter:  exz                |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Cache              |     Version:  3.4.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by exz):

 Just realized that this could be tested without the need for multiple page
 loads. I created a unit test for it: https://gist.github.com/3923951

 {{{
 $ phpunit tests/option/option.php
 Installing...
 Running as single site... To run multisite, use -c multisite.xml
 Not running ajax tests... To execute these, use --group ajax.
 PHPUnit 3.6.11 by Sebastian Bergmann.

 Configuration read from /Users/rickard/unit-
 test.svn.wordpress.org/trunk/phpunit.xml

 ...F

 Time: 1 second, Memory: 42.00Mb

 There was 1 failure:

 1) Tests_Option_Option::test_multiple_calls
 Failed asserting that false is true.

 /Users/rickard/unit-
 test.svn.wordpress.org/trunk/tests/option/option.php:92
 /usr/bin/phpunit:46

 FAILURES!
 Tests: 4, Assertions: 31, Failures: 1.
 }}}

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


More information about the wp-trac mailing list