jenkins-bot has submitted this change and it was merged.
Change subject: Allow titles with falsy title text in suggestions
......................................................................
Allow titles with falsy title text in suggestions
A valid title, such as 0, would end up being ignored in this clause and
not providing a title. Make the empty string check stricter to allow
these titles through.
Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588
---
M includes/search/SearchSuggestion.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
DCausse: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/search/SearchSuggestion.php
b/includes/search/SearchSuggestion.php
index cd9062b..80a437b 100644
--- a/includes/search/SearchSuggestion.php
+++ b/includes/search/SearchSuggestion.php
@@ -84,7 +84,7 @@
*/
public function setText( $text, $setTitle = true ) {
$this->text = $text;
- if ( $setTitle && $text ) {
+ if ( $setTitle && $text !== '' && $text !== null ) {
$this->setSuggestedTitle( Title::makeTitle( 0, $text )
);
}
}
--
To view, visit https://gerrit.wikimedia.org/r/279555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I938a7dfe294e979c19f720eadb6f96282b1c4588
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits