From c164fc5312292eee881b551904e7f0a9a22a3b16 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 10 Jun 2004 06:36:02 +0000 Subject: [PATCH] Work around search with invalid title dying with bad title deref error. Will still produce bad edit link though. --- includes/SearchEngine.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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; -- 2.20.1