Work around search with invalid title dying with bad title deref error. Will still...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 10 Jun 2004 06:36:02 +0000 (06:36 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 10 Jun 2004 06:36:02 +0000 (06:36 +0000)
includes/SearchEngine.php

index 0cdbf54..53d9e69 100644 (file)
@@ -487,8 +487,13 @@ class SearchEngine {
                        $wgOut->redirect( $t->getFullURL( "action=edit" ) );
                        return;
                }
-
-               $wgOut->addHTML( "<p>" . wfMsg("nogomatch", $t->escapeLocalURL( "action=edit" ) ) . "</p>\n" );
+               
+               if( $t ) {
+                       $editurl = $t->escapeLocalURL( "action=edit" );
+               } else {
+                       $editurl = ""; # ?? 
+               }
+               $wgOut->addHTML( "<p>" . wfMsg("nogomatch", $editurl ) . "</p>\n" );
 
                # Try a fuzzy title search
                $anyhit = false;