From a85233dc747e351bb8bc560b4635bf55d89f1a92 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 23 Jun 2005 02:16:10 +0000 Subject: [PATCH] * Trim whitespace from option values to weather line-ending corruption problems --- RELEASE-NOTES | 1 + includes/User.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 07a9165497..7ec1db5a75 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -326,6 +326,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 750) Keep line endings consistent in LocalSettings.php * (bug 1577) Add 'printable version' tab in MonoBook for people who don't realize you can just hit print to get a nicely formatted printable page. +* Trim whitespace from option values to weather line-ending corruption problems === Caveats === diff --git a/includes/User.php b/includes/User.php index 4242b81625..c73da9320e 100644 --- a/includes/User.php +++ b/includes/User.php @@ -775,7 +775,7 @@ class User { function getOption( $oname ) { $this->loadFromDatabase(); if ( array_key_exists( $oname, $this->mOptions ) ) { - return $this->mOptions[$oname]; + return trim( $this->mOptions[$oname] ); } else { return ''; } -- 2.20.1