From: Brion Vibber Date: Thu, 10 Jun 2004 06:36:02 +0000 (+0000) Subject: Work around search with invalid title dying with bad title deref error. Will still... X-Git-Tag: 1.5.0alpha1~2951 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=c164fc5312292eee881b551904e7f0a9a22a3b16;p=lhc%2Fweb%2Fwiklou.git Work around search with invalid title dying with bad title deref error. Will still produce bad edit link though. --- diff --git a/includes/SearchEngine.php b/includes/SearchEngine.php index 0cdbf544c5..53d9e69159 100644 --- a/includes/SearchEngine.php +++ b/includes/SearchEngine.php @@ -487,8 +487,13 @@ class SearchEngine { $wgOut->redirect( $t->getFullURL( "action=edit" ) ); return; } - - $wgOut->addHTML( "

" . wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "

\n" ); + + if( $t ) { + $editurl = $t->escapeLocalURL( "action=edit" ); + } else { + $editurl = ""; # ?? + } + $wgOut->addHTML( "

" . wfMsg("nogomatch", $editurl ) . "

\n" ); # Try a fuzzy title search $anyhit = false;