Closed

Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 2.8.17 |
Scenario: I'm validating an entity like this
$validator->validate($device, [
new UniqueEntity([
'fields' => ['accountId', 'tenantUuid'],
'em' => $provisioningEm
])
]);
If accountId
happens to be null, UniqueEntityValidator will now exclude it from the constraint list (since commit 1e3421d ), failing later on because $criteria[$fields[0]]
is an invalid array access: fields[0]
is the string "accountId", which is not in $criteria
.
Reverting lines 88-94 to the version before the commit linked above fixes the issue.