8000 Fix #12315 · Engerim/symfony@53016a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 53016a5

Browse files
author
Alexander Miehe
committed
* change string check
1 parent c964fcb commit 53016a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Validator/Constraints/ExpressionValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function validate($value, Constraint $constraint)
4747
$variables['value'] = $value;
4848
$variables['this'] = $this->context->getObject();
4949

50-
if (strlen($constraint->dataPath) > 0) {
50+
if (null !== $constraint->dataPath && '' !== $constraint->dataPath) {
5151
$variables['this'] = $this->getPropertyAccessor()->getValue($this->context, $constraint->dataPath);
5252
}
5353

0 commit comments

Comments
 (0)
0