diff --git a/Classes/ResultsetModifier/LastSearches.php b/Classes/ResultsetModifier/LastSearches.php
index <HASH>..<HASH> 100644
--- a/Classes/ResultsetModifier/LastSearches.php
+++ b/Classes/ResultsetModifier/LastSearches.php
@@ -47,6 +47,11 @@ class Tx_Solr_ResultsetModifier_LastSearches implements Tx_Solr_ResultSetModifie
 		$this->configuration = $resultCommand->getParentPlugin()->getConfiguration();
 		$keywords = $resultCommand->getParentPlugin()->getSearch()->getQuery()->getKeywordsCleaned();
 
+		$keywords = trim($keywords);
+		if(empty($keywords)) {
+			return $resultSet;
+		}
+
 		switch ($this->configuration['search.']['lastSearches.']['mode']) {
 			case 'user':
 				$this->storeKeywordsToSession($keywords);
[BUGFIX] Prevent LastSearches from adding empty queries

Change-Id: Ibaafe8ce<I>b<I>a3bfc<I>a4cf0e<I>b