From: Alexandre Emsenhuber Date: Sat, 27 Mar 2010 16:15:17 +0000 (+0000) Subject: * (bug 22876) Avoid possible PHP Notice if $wgDefaultUserOptions is not correctly set X-Git-Tag: 1.31.0-rc.0~37336 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=98b7af8d122a2223dd7935ef9f1d379bb221875d;p=lhc%2Fweb%2Fwiklou.git * (bug 22876) Avoid possible PHP Notice if $wgDefaultUserOptions is not correctly set Per Nikerabbit, use User::getDefaultOption() --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1f4113631b..04c9f5c37d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/languages/Language.php b/languages/Language.php index ef50f73624..aa1a65c34a 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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;