Fix for bug 174: 0 as an article name behaves strangely (numerical comparison in article-ids).
http://bugzilla.wikipedia.org/show_bug.cgi?id=174
}
}
- if( ( $nt->getPrefixedText() == $this->mTitle->getPrefixedText() ) &&
- ( strpos( $link, '#' ) == FALSE ) ) {
+ if( ( $nt->getPrefixedText() === $this->mTitle->getPrefixedText() ) &&
+ ( strpos( $link, '#' ) === FALSE ) ) {
# Self-links are handled specially; generally de-link and change to bold.
$s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, '', $trail );
continue;
}
wfProfileIn( "main-action" );
-if( $search = $wgRequest->getText( 'search' ) ) {
+$search = $wgRequest->getText( 'search' );
+if( !is_null( $search ) && $search !== '' ) {
require_once( 'SearchEngine.php' );
$wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
$searchEngine = new SearchEngine( $search );