check null title
authorRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 28 Jun 2005 17:42:47 +0000 (17:42 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Tue, 28 Jun 2005 17:42:47 +0000 (17:42 +0000)
includes/SearchEngine.php

index 46e77ec..81d2ad6 100644 (file)
@@ -53,6 +53,9 @@ class SearchEngine {
        function getNearMatch( $term ) {
                # Exact match? No need to look further.
                $title = Title::newFromText( $term );
+               if (is_null($title))
+                       return NULL;
+
                if ( $title->getNamespace() == NS_SPECIAL || $title->exists() ) {
                        return $title;
                }