X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityConstraintViolationList.php;fp=web%2Fcore%2Flib%2FDrupal%2FCore%2FEntity%2FEntityConstraintViolationList.php;h=6081a8de16830bb0339599dda15c2cc2657e0fae;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=c3404b6fa7fc7faeafe0fbc2374409a7198bb707;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php b/web/core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php index c3404b6fa..6081a8de1 100644 --- a/web/core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php +++ b/web/core/lib/Drupal/Core/Entity/EntityConstraintViolationList.php @@ -68,6 +68,11 @@ class EntityConstraintViolationList extends ConstraintViolationList implements E if ($this->entity->hasField($field_name)) { $this->violationOffsetsByField[$field_name][$offset] = $offset; } + // If the first part of the violation property path is not a valid + // field name, we're dealing with an entity-level validation. + else { + $this->entityViolationOffsets[$offset] = $offset; + } } else { $this->entityViolationOffsets[$offset] = $offset;