diff --git a/core/components/simplesearch/model/simplesearch/simplesearch.class.php b/core/components/simplesearch/model/simplesearch/simplesearch.class.php index 7e63fc9..42ee304 100644 --- a/core/components/simplesearch/model/simplesearch/simplesearch.class.php +++ b/core/components/simplesearch/model/simplesearch/simplesearch.class.php @@ -144,7 +144,7 @@ public function loadDriver(array $scriptProperties = array()) { * @return string The parsed and cleansed string. */ public function parseSearchString($str = '') { - $minChars = $this->modx->getOption('minChars', $this->config, 4); + $minChars = $this->modx->getOption('minChars', $this->config, 3); $this->searchArray = explode(' ',$str); $this->searchArray = $this->modx->sanitize($this->searchArray, $this->modx->sanitizePatterns); @@ -152,7 +152,7 @@ public function parseSearchString($str = '') { $reserved = array('AND', 'OR', 'IN', 'NOT'); foreach ($this->searchArray as $key => $term) { $this->searchArray[$key] = strip_tags($term); - if (strlen($term) < $minChars && !in_array($term, $reserved)) { + if (iconv_strlen($term) < $minChars && in_array($term, $reserved)) { unset($this->searchArray[$key]); } }