Skip to content

Commit 785b669

Browse files
hunyoboygdbrown
authored andcommitted
#288 - Cannot Search Nodes Using Timefield Fixer (#17)
* ensure to perform lowercase action for strings data type only * bump up change log * check to execute string casting if it's only an instance of Numbr * update change log comment
1 parent f87202c commit 785b669

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG-0.x.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CHANGELOG for 0.x
22
This changelog references the relevant changes done in 0.x versions.
33

4+
## v0.3.1
5+
* BUG :: Fix invalid string casting on Numbr in ElasticaQueryBuilder.
46

57
## v0.3.0
68
__BREAKING CHANGES__

src/Builder/ElasticaQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ protected function addTermToQuery(string $method, Node $node, ?Field $field = nu
451451
return;
452452
}
453453

454-
$value = $this->lowerCaseTerms ? strtolower((string)$node->getValue()) : $node->getValue();
454+
$value = $this->lowerCaseTerms && !$node instanceof Numbr ? strtolower((string)$node->getValue()) : $node->getValue();
455455
$fieldName = $this->inField() ? $field->getName() : $this->defaultFieldName;
456456

457457
if ($this->inField() && !$this->inSubquery()) {

0 commit comments

Comments
 (0)