# Redundant interwiki prefix to the local wiki
foreach ( $this->localInterwikis as $localIW ) {
- if ( 0 == strcasecmp( $parts['interwiki'], $localIW ) ) {
+ if ( strcasecmp( $parts['interwiki'], $localIW ) == 0 ) {
if ( $dbkey == '' ) {
# Empty self-links should point to the Main Page, to ensure
# compatibility with cross-wiki transclusions and the like.
} while ( true );
$fragment = strstr( $dbkey, '#' );
- if ( false !== $fragment ) {
+ if ( $fragment !== false ) {
$parts['fragment'] = str_replace( '_', ' ', substr( $fragment, 1 ) );
$dbkey = substr( $dbkey, 0, strlen( $dbkey ) - strlen( $fragment ) );
# remove whitespace again: prevents "Foo_bar_#"
}
// Any remaining initial :s are illegal.
- if ( $dbkey !== '' && ':' == $dbkey[0] ) {
+ if ( $dbkey !== '' && $dbkey[0] == ':' ) {
throw new MalformedTitleException( 'title-invalid-leading-colon', $text );
}