From: Bartosz Dziewoński Date: Wed, 23 Jul 2014 19:57:40 +0000 (+0200) Subject: User: Normalize skin key from $wgDefaultSkin for default options X-Git-Tag: 1.31.0-rc.0~14787^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=6cf0e518801b271dd7091e616132b6280cb69c9f;p=lhc%2Fweb%2Fwiklou.git User: Normalize skin key from $wgDefaultSkin for default options $wgDefaultSkin is allowed not to actually be a valid key (although doing that is obviously very unwise), which in turn can cause exceptions from Preferences::loadPreferenceValues() (MWException "Global default…"), which in turn causes failure of SpecialPreferencesTest::testBug41337() test. Change-Id: I8f8ae9ba301337b2e6facd3dcfadbf2ab12ac605 --- diff --git a/includes/User.php b/includes/User.php index ce3ea74839..778e713c7d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1385,7 +1385,7 @@ class User implements IDBAccessObject { foreach ( SearchEngine::searchableNamespaces() as $nsnum => $nsname ) { $defOpt['searchNs' . $nsnum] = !empty( $wgNamespacesToBeSearchedDefault[$nsnum] ); } - $defOpt['skin'] = $wgDefaultSkin; + $defOpt['skin'] = Skin::normalizeKey( $wgDefaultSkin ); wfRunHooks( 'UserGetDefaultOptions', array( &$defOpt ) );