http://www.mediawiki.org/wiki/Special:Code/MediaWiki/74156

Revision: 74156
Author:   bawolff
Date:     2010-10-02 21:35:00 +0000 (Sat, 02 Oct 2010)

Log Message:
-----------
follow-up r74150 - empty() == bad.

Modified Paths:
--------------
    trunk/phase3/includes/Preferences.php

Modified: trunk/phase3/includes/Preferences.php
===================================================================
--- trunk/phase3/includes/Preferences.php       2010-10-02 21:24:08 UTC (rev 
74155)
+++ trunk/phase3/includes/Preferences.php       2010-10-02 21:35:00 UTC (rev 
74156)
@@ -1107,7 +1107,8 @@
                                        $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 @@
 
        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.



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to