Skip to content

Commit c46c579

Browse files
authored
fix(doctrine): do not consider empty string as a current date (#7291)
1 parent d1073bc commit c46c579

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Doctrine/Common/Filter/DateFilterTrait.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ private function normalizeValue($value, string $operator): ?string
9191
return null;
9292
}
9393

94+
if ('' === $value) {
95+
$this->getLogger()->notice('Invalid filter ignored', [
96+
'exception' => new InvalidArgumentException(\sprintf('Invalid value for "[%s]", expected non-empty string', $operator)),
97+
]);
98+
99+
return null;
100+
}
101+
94102
return $value;
95103
}
96104
}

0 commit comments

Comments
 (0)