From 7dcc7872aad0ac9e0d9494e0942dbd64c4f08e11 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 11 Oct 2010 14:10:23 +0000 Subject: [PATCH] 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) --- includes/User.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.20.1