* (bug 22876) Avoid possible PHP Notice if $wgDefaultUserOptions is not correctly set
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Mar 2010 16:15:17 +0000 (16:15 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 27 Mar 2010 16:15:17 +0000 (16:15 +0000)
Per Nikerabbit, use User::getDefaultOption()

RELEASE-NOTES
languages/Language.php

index 1f41136..04c9f5c 100644 (file)
@@ -60,6 +60,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 22940) Namespace aliases pointing to main namespace don't work
 * (bug 15810) blocked admins can no longer block/unblock other users, nor
   themselves unless they are given the 'unblockself' permission.
+* (bug 22876) Avoid possible PHP Notice if $wgDefaultUserOptions is not
+  correctly set
 
 == API changes in 1.17 ==
 * (bug 22738) Allow filtering by action type on query=logevent
index ef50f73..aa1a65c 100644 (file)
@@ -1367,8 +1367,7 @@ class Language {
                        if( $usePrefs ) {
                                $datePreference = $wgUser->getDatePreference();
                        } else {
-                               $options = User::getDefaultOptions();
-                               $datePreference = (string)$options['date'];
+                               $datePreference = (string)User::getDefaultOption( 'date' );
                        }
                } else {
                        $datePreference = (string)$usePrefs;