- Changed back to using if $x === false, if ($x) is a logic error in this
case because PHP thinks (among other things) that (int)0 and (string)0 are
false, so a custom signiture that was "0" would fail
- $nick was changed to $nickname in 1.564 in most places, but not all, as a
result no fancy signiture worked (feature?;) and php vomited E_NOTICE
- $name => $username, same thing as above, variable name change where not all
of them were changed resulting in E_NOTICE etc. etc.
$nickname = trim( $user->getOption( 'nickname' ) );
$nickname = ( $nickname == '' ? $username : $nickname );
- if( $user->getOption( 'fancysig' ) ) {
+ if( $user->getOption( 'fancysig' ) !== false ) {
# Sig. might contain markup; validate this
- if( $this->validateSig( $nickname ) ) {
+ if( $this->validateSig( $nickname ) !== false ) {
# Validated; clean up (if needed) and return it
- return( $this->cleanSig( $nick ) );
+ return( $this->cleanSig( $nickname ) );
} else {
# Failed to validate; fall back to the default
$nickname = $username;
- wfDebug( "Parser::getUserSig: $name has bad XML tags in signature.\n" );
+ wfDebug( "Parser::getUserSig: $username has bad XML tags in signature.\n" );
}
}