Trim quotes

This commit is contained in:
James Cole 2025-01-06 06:55:34 +01:00
parent 2bd1b37717
commit 1afcaea4c6
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -96,7 +96,7 @@ class QueryParser implements QueryParserInterface
case '-': case '-':
if ('' === $tokenUnderConstruction) { if ('' === $tokenUnderConstruction) {
// A minus sign at the beginning of a token indicates prohibition // A minus sign at the beginning of a token indicates prohibition
Log::debug('Indicate prohibition'); // Log::debug('Indicate prohibition');
$prohibited = true; $prohibited = true;
} }
if ('' !== $tokenUnderConstruction) { if ('' !== $tokenUnderConstruction) {
@ -196,6 +196,8 @@ class QueryParser implements QueryParserInterface
{ {
if ('' !== $fieldName) { if ('' !== $fieldName) {
Log::debug(sprintf('Create FieldNode %s:%s (%s)', $fieldName, $token, var_export($prohibited, true))); Log::debug(sprintf('Create FieldNode %s:%s (%s)', $fieldName, $token, var_export($prohibited, true)));
$token = ltrim($token, ':"');
$token = rtrim($token, '"');
return new FieldNode(trim($fieldName), trim($token), $prohibited); return new FieldNode(trim($fieldName), trim($token), $prohibited);
} }