Last modified: 2014-02-04 10:56:16 UTC
Before ff355e87e2f7a41a87c37f43232a44113cb033e0 (see https://git.wikimedia.org/blob/mediawiki%2Fcore.git/c0d3e85b06d628e5c4a7c93cfe5fb7587f9118f0/includes%2FUser.php#L4634 ), a preference would save in two conditions: 1. Default is null, and the saved value is neither exactly (===) false nor null. 2. Saved value != the default. As a special case of #2, the value false *should* save, as long as the default value was != false. For instance, this applies if the default is true, since false != true. (Note, false == null, so there is no way false can save if null is the default). This bug is on MediaWiki.org.
Change 110473 had a related patch set uploaded by Mattflaschen: Revert "User::saveOptions() optimization" https://gerrit.wikimedia.org/r/110473
Change 110477 had a related patch set uploaded by Mattflaschen: Revert "User::saveOptions() optimization" https://gerrit.wikimedia.org/r/110477
Change 110473 merged by jenkins-bot: Revert "User::saveOptions() optimization" https://gerrit.wikimedia.org/r/110473
Fixed in master. To reproduce on MediaWiki.org: 1. Go to https://www.mediawiki.org/w/index.php?title=Special:Preferences#mw-prefsection-watchlist 2. Uncheck "Add pages I create and files I upload to my watchlist". 3. Click save It stays checked.
Sorry about that and thank you Matthew for the prompt reversion. I should propose the patch again whenever I manage to write a test for this case and fix it up.
Proposed again as https://gerrit.wikimedia.org/r/#/c/110516/
Change 110477 merged by jenkins-bot: Revert "User::saveOptions() optimization" https://gerrit.wikimedia.org/r/110477