#1372376 by Nick Lewis: Don't break on caching of filter_search
authorDaniel Wehner
Sat, 17 Dec 2011 03:17:34 +0000 (04:17 +0100)
committerDaniel Wehner
Sat, 17 Dec 2011 03:17:34 +0000 (04:17 +0100)
modules/search/views_handler_filter_search.inc

index b7fe035..4ed228d 100644 (file)
@@ -163,6 +163,8 @@ class views_handler_filter_search extends views_handler_filter {
       $placeholder = $this->placeholder();
       $this->query->add_having_expression($this->options['group'], "COUNT(*) >= $placeholder", array($placeholder => $matches));
     }
+    // Set to NULL to prevent PDO exception when views object is cached.
+    $this->search_query = NULL;
   }
 }