-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Please,
I think there is a bug, comparing unique array, when items are objects.
Consider:
protected function checkUniqueItems($entity, $schema, $entityName) {
if (isset($schema->uniqueItems) && $schema->uniqueItems) {
if (count(array_unique($entity)) != count($entity)) {
With this:
protected function checkUniqueItems($entity, $schema, $entityName) {
if (isset($schema->uniqueItems) && $schema->uniqueItems) {
if (count(array_unique($entity,SORT_REGULAR)) != count($entity)) {
Adding SORT_REGULAR (or perhaps depending on type of ites) flag on array_unique items
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels