Last modified: 2011-02-14 01:19:37 UTC
Created attachment 4299 [details]
normalises keys that are added to MessageCache
The following bug was found and examined in mediawiki 1.10.0 but a short look at the source code of 1.11 lets me assume its still in there too. Version 1.8 is not affected.
The method get() of the class MessageObject in include/MessageCache.php enforces message normalisation by lowercasing the first char of a key and replacing all underscores with blanks in these keys. Since this normalisation is not applied when messages are stored in the cache (e.g. by method addMessages), this breaks extensions which do not us normalised keys (like PageProtectionPlus). The attached patch applies normalisation on message adding.
Not really worth the overhead. The extensions that misuse this should be fixed.
(In reply to comment #1)
> Not really worth the overhead. The extensions that misuse this should be fixed.
What overhead? It's like a five-line fix and reportedly a regression.
Partly done in r47362
addMessages() doesn't exist anymore. Nothing really to fix here, marking INVALID.