Skip to content

Commit 01b7864

Browse files
authored
Fix date time range filter data extraction (#24)
1 parent 880f58a commit 01b7864

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

Event/Subscriber/AbstractDoctrineSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function filterDateTimeRange(GetFilterConditionEvent $event)
147147
$values = $event->getValues();
148148
$value = $values['value'];
149149

150-
if (isset($value['left_datetime'][0]) || $value['right_datetime'][0]) {
150+
if (isset($value['left_datetime'][0]) || isset($value['right_datetime'][0])) {
151151
$event->setCondition($expr->datetimeInRange($event->getField(), $value['left_datetime'][0], $value['right_datetime'][0]));
152152
}
153153
}

Filter/DataExtractor/FormDataExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function addMethod(DataExtractionMethodInterface $method)
4747
public function extractData(FormInterface $form, $methodName)
4848
{
4949
if (!isset($this->methods[$methodName])) {
50-
throw new \RuntimeException(sprintf('Unknown extration method maned "%s".', $methodName));
50+
throw new \RuntimeException(sprintf('Unknown extraction method maned "%s".', $methodName));
5151
}
5252

5353
return $this->methods[$methodName]->extract($form);

Filter/DataExtractor/Method/ValueKeysExtractionMethod.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ public function extract(FormInterface $form)
5353
$values['value'][$key][$k] = $v;
5454
}
5555
}
56-
} else {
57-
dump($keys, $data);
58-
throw new \InvalidArgumentException(sprintf('No value found for key "%s" in form data.', $key));
5956
}
6057
}
6158

0 commit comments

Comments
 (0)