From: Roan Kattouw Date: Mon, 11 Oct 2010 14:10:23 +0000 (+0000) Subject: When reading an old-style user_options blob, use the default value for any preference... X-Git-Tag: 1.31.0-rc.0~34542 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=7dcc7872aad0ac9e0d9494e0942dbd64c4f08e11;p=lhc%2Fweb%2Fwiklou.git When reading an old-style user_options blob, use the default value for any preferences not set in the blob. This'll hopefully fix bug 25416 ($options['editfont'] not set even though editfont is a legit pref) --- diff --git a/includes/User.php b/includes/User.php index 6430ace27f..a3f6cddbe2 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2411,7 +2411,9 @@ class User { $this->mOptionsLoaded = true; $this->mOptionOverrides = array(); - $this->mOptions = array(); + // If an option is not set in $str, use the default value + $this->mOptions = self::getDefaultOptions(); + $a = explode( "\n", $str ); foreach ( $a as $s ) { $m = array();