Last modified: 2013-01-14 16:55:40 UTC
Reproducing the bug: * Create a new item with label "test" and description "test" * Add 3 aliases, "A", "B", "C" * Add a "en" sitelink "Berlin" * Change the label to "test_changed" * Change the description to "test_changed" * Edit the aliases, clear the field with alias "A" and add a new alias "A2" in the same step. * Edit the "en" sitelink and change it to "Berlin Wall" * Click on "View history" to see the revisions * Undo the aliases change "(Added and removed [en] aliases: A2, A)" * Bug: now the alias "A2" gets removed but the alias "A" does not get restored. This bug occurs since Ic46422c3 and Ibfbc0902 got merged in.
Issue found: 'aliases' => array (size=1) 'en' => array (size=1) 1 => string 'A2' (length=2) As you can see, this entity has an array with aliases with a single element with key 1. Since it's 1, and not 0, it does not match what can be safely interpreted as a non-associate array, and this gets treated as an associative one by the differ using a MapDiff rather then a ListDiff.
https://gerrit.wikimedia.org/r/#/c/39588/
Verified in Wikidata demo sprint 28