jenkins-bot has submitted this change and it was merged.

Change subject: Don't use empty() to check if array has 0 items
......................................................................


Don't use empty() to check if array has 0 items

Change-Id: Ia3d8a6882224aa900574d4584411a02fa1884119
---
M CirrusSearch.body.php
M updateSearchConfig.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Manybubbles: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 8008af9..fa42d21 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -190,7 +190,7 @@
                }
 
                // Actual text query
-               if ( trim( $term ) !== '' || !empty( $extraQueryStrings ) ) {
+               if ( trim( $term ) !== '' || $extraQueryStrings ) {
                        $queryStringQueryString = trim( implode( ' ', 
$extraQueryStrings ) . ' ' . CirrusSearch::fixupQueryString( $term ) );
                        $queryStringQuery = new \Elastica\Query\QueryString( 
$queryStringQueryString );
                        $fields = array( 'title^20.0', 'text^3.0' );
diff --git a/updateSearchConfig.php b/updateSearchConfig.php
index 63fcc91..5717985 100644
--- a/updateSearchConfig.php
+++ b/updateSearchConfig.php
@@ -217,7 +217,7 @@
                                $otherIndeciesWithAlias[] = $index->getName();
                        }
                }
-               if ( empty( $otherIndeciesWithAlias ) ) {
+               if ( !$otherIndeciesWithAlias ) {
                        $this->output( "alias is free..." );
                        $this->getIndex()->addAlias( 
CirrusSearch::getIndexName(), false );
                        $this->output( "corrected\n" );

-- 
To view, visit https://gerrit.wikimedia.org/r/74560
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3d8a6882224aa900574d4584411a02fa1884119
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Demon <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to