Merge "Allow titles with falsy title text in suggestions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 25 Mar 2016 11:01:08 +0000 (11:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 25 Mar 2016 11:01:08 +0000 (11:01 +0000)
includes/search/SearchSuggestion.php

index cd9062b..80a437b 100644 (file)
@@ -84,7 +84,7 @@ class SearchSuggestion {
         */
        public function setText( $text, $setTitle = true ) {
                $this->text = $text;
-               if ( $setTitle && $text ) {
+               if ( $setTitle && $text !== '' && $text !== null ) {
                        $this->setSuggestedTitle( Title::makeTitle( 0, $text ) );
                }
        }