* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
- *
*/
/**
* A search suggestion
- *
*/
class SearchSuggestion {
/**
/**
* Construct a new suggestion
* @param float $score the suggestion score
- * @param string $text|null the suggestion text
+ * @param string|null $text the suggestion text
* @param Title|null $suggestedTitle the suggested title
* @param int|null $suggestedTitleID the suggested title ID
*/
*/
public function setText( $text, $setTitle = true ) {
$this->text = $text;
- if ( $setTitle && $text ) {
+ if ( $setTitle && $text !== '' && $text !== null ) {
$this->setSuggestedTitle( Title::makeTitle( 0, $text ) );
}
}