diff --git a/includes/class-better-search-core-query.php b/includes/class-better-search-core-query.php index 7e0be03..af655f3 100644 --- a/includes/class-better-search-core-query.php +++ b/includes/class-better-search-core-query.php @@ -917,7 +917,7 @@ public function posts_orderby( $orderby, $query ) { // Initialize an array to build the orderby clauses. $orderby_clauses = array(); - if ( ! empty( $this->use_fulltext ) || empty( $this->match_sql ) ) { + if ( ! empty( $this->use_fulltext ) && ! empty( $this->match_sql ) ) { $orderby_clauses[] = ' score DESC '; } diff --git a/readme.txt b/readme.txt index 156cf6a..fde27eb 100644 --- a/readme.txt +++ b/readme.txt @@ -111,6 +111,11 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro == Changelog == += 4.0.4 = + +* Bug fixes: + * Search terms with three or less characters threw an error. + = 4.0.3 = Release post: [https://webberzone.com/announcements/better-search-v4-enhance-wordpress-search-with-pro-features/](https://webberzone.com/announcements/better-search-v4-enhance-wordpress-search-with-pro-features/)