jenkins-bot has submitted this change and it was merged.
Change subject: Fix Call to a member function getNamespace() on a non-object
......................................................................
Fix Call to a member function getNamespace() on a non-object
Not sure to understand in which case it happens but it happens.
bug: T124431
Change-Id: I820d67c9dcd1c74e636d83b013a982cb9dfe6e52
---
M includes/CirrusSearch.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
EBernhardson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/CirrusSearch.php b/includes/CirrusSearch.php
index 3fa038a..a4bc7b9 100644
--- a/includes/CirrusSearch.php
+++ b/includes/CirrusSearch.php
@@ -394,7 +394,7 @@
// We append a random letter behind just in case the search
// string ends with ':'.
$title = Title::newFromText( $search . "A" );
- if ( $title->getNamespace() != NS_MAIN
+ if ( ( $title && $title->getNamespace() != NS_MAIN )
|| count( $this->namespaces ) != 1
|| reset( $this->namespaces ) != NS_MAIN ) {
// Fallback to prefix search if we are not on content
namespace
--
To view, visit https://gerrit.wikimedia.org/r/265782
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I820d67c9dcd1c74e636d83b013a982cb9dfe6e52
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Manybubbles <[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