Fix undefined variable notice if $wgHiddenPrefs[] = 'fancysig'.
authorBrian Wolff <bawolff@users.mediawiki.org>
Sat, 2 Oct 2010 20:36:23 +0000 (20:36 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Sat, 2 Oct 2010 20:36:23 +0000 (20:36 +0000)
Use !empty($blah) since that is what the rest of the code is doing. This does
not change the behaviour in any way, only gets rid of the warning. Issue
discovered by jorenl on irc.

includes/Preferences.php

index abb3f5c..6a16024 100644 (file)
@@ -1117,7 +1117,7 @@ class Preferences {
 
        static function cleanSignature( $signature, $alldata ) {
                global $wgParser;
-               if ( $alldata['fancysig'] ) {
+               if ( !empty( $alldata['fancysig'] ) ) {
                        $signature = $wgParser->cleanSig( $signature );
                } else {
                        // When no fancy sig used, make sure ~{3,5} get removed.