Adjust quotation marks in search query before 'str_getcsv'.

This moves a potential first quotation mark to before the associated keyword to ensure 'str_getcsv' groups the key and value correctly.  Without this 'str_getcsv' would split on potential spaces within the quoted value.
This commit is contained in:
wn_ 2021-03-27 00:18:05 +00:00
parent 0b82afabd5
commit 5d5c034a90
1 changed files with 1 additions and 2 deletions

View File

@ -2054,8 +2054,7 @@ class Feeds extends Handler_Protected {
}
private static function _search_to_sql($search, $search_language, $owner_uid) {
$keywords = str_getcsv(trim($search), " ");
$keywords = str_getcsv(preg_replace('/(-?\w+)\:"(\w+)/', '"${1}:${2}', trim($search)), ' ');
$query_keywords = array();
$search_words = array();
$search_query_leftover = array();