From b88d5a8f12a5da52e3c3cf7578651685b4ceadc6 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Sat, 2 Oct 2010 21:35:00 +0000 Subject: [PATCH] follow-up r74150 - empty() == bad. --- includes/Preferences.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index 6a16024fc4..c330cdd7f8 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -1107,7 +1107,8 @@ class Preferences { $wgLang->formatNum( $wgMaxSigChars ) ) ); - } elseif ( !empty( $alldata['fancysig'] ) && + } elseif ( isset( $alldata['fancysig'] ) && + $alldata['fancysig'] && false === $wgParser->validateSig( $signature ) ) { return Xml::element( 'span', array( 'class' => 'error' ), wfMsg( 'badsig' ) ); } else { @@ -1117,7 +1118,7 @@ class Preferences { static function cleanSignature( $signature, $alldata ) { global $wgParser; - if ( !empty( $alldata['fancysig'] ) ) { + if ( isset( $alldata['fancysig'] ) && $alldata['fancysig'] ) { $signature = $wgParser->cleanSig( $signature ); } else { // When no fancy sig used, make sure ~{3,5} get removed. -- 2.20.1