summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatthew-gill2018-02-04 10:01:54 (GMT)
committerThomas Seidl2018-02-04 10:01:54 (GMT)
commite2edb531ffbb13cef5abb4513cdc4a1f37e2dadb (patch)
treea11ebe0a316b3562e0e0bcf04aef654665135b2a
parentafeb07b06fcd4565bc1683a7738fae23f5ae235b (diff)
Issue #2939085 by mattgill, drunken monkey: Fixed fatal error in Views when trying to set keywords conjunction on aborted query.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--src/Plugin/views/filter/SearchApiFulltext.php3
-rw-r--r--src/Plugin/views/query/SearchApiQuery.php4
3 files changed, 7 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 76b76e6..9f75dc6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,5 +1,7 @@
Search API 1.x, dev (xxxx-xx-xx):
---------------------------------
+- #2939085 by mattgill, drunken monkey: Fixed fatal error in Views when trying
+ to set keywords conjunction on aborted query.
- #2933811 by drunken monkey: Fixed coding standards in new Drush code.
- #2932347 by drunken monkey, ghaya: Fixed case insensitive matching for
highlighting non-ASCII text.
diff --git a/src/Plugin/views/filter/SearchApiFulltext.php b/src/Plugin/views/filter/SearchApiFulltext.php
index f13b636..d02be82 100644
--- a/src/Plugin/views/filter/SearchApiFulltext.php
+++ b/src/Plugin/views/filter/SearchApiFulltext.php
@@ -280,6 +280,9 @@ class SearchApiFulltext extends FilterPluginBase {
$fields = $this->options['fields'];
$fields = $fields ? $fields : array_keys($this->getFulltextFields());
$query = $this->getQuery();
+ if ($query->shouldAbort()) {
+ return;
+ }
if ($this->options['parse_mode']) {
$parse_mode = $this->getParseModeManager()
diff --git a/src/Plugin/views/query/SearchApiQuery.php b/src/Plugin/views/query/SearchApiQuery.php
index 2263296..eaf0873 100644
--- a/src/Plugin/views/query/SearchApiQuery.php
+++ b/src/Plugin/views/query/SearchApiQuery.php
@@ -680,8 +680,8 @@ class SearchApiQuery extends QueryPluginBase {
/**
* Retrieves the parse mode.
*
- * @return \Drupal\search_api\ParseMode\ParseModeInterface
- * The parse mode.
+ * @return \Drupal\search_api\ParseMode\ParseModeInterface|null
+ * The parse mode, or NULL if the query was aborted.
*
* @see \Drupal\search_api\Query\QueryInterface::getParseMode()
*/