X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FTypedData%2FTypedDataManager.php;h=9ac018c37efdb48cfd06d528e88542ea65311e49;hb=refs%2Fheads%2Fd864;hp=dbf0d5fec544b28be2684756fe0261d9d08f8a83;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/TypedData/TypedDataManager.php b/web/core/lib/Drupal/Core/TypedData/TypedDataManager.php index dbf0d5fec..9ac018c37 100644 --- a/web/core/lib/Drupal/Core/TypedData/TypedDataManager.php +++ b/web/core/lib/Drupal/Core/TypedData/TypedDataManager.php @@ -168,9 +168,8 @@ class TypedDataManager extends DefaultPluginManager implements TypedDataManagerI // a shorter string than the serialized form, so array access is faster. $parts[] = json_encode($settings); } - // Property path for the requested data object. When creating a list item, - // use 0 in the key as all items look the same. - $parts[] = $object->getPropertyPath() . '.' . (is_numeric($property_name) ? 0 : $property_name); + // Property path for the requested data object. + $parts[] = $object->getPropertyPath() . '.' . $property_name; $key = implode(':', $parts); // Create the prototype if needed. @@ -189,7 +188,7 @@ class TypedDataManager extends DefaultPluginManager implements TypedDataManagerI throw new \InvalidArgumentException("Property $property_name is unknown."); } // Create the prototype without any value, but with initial parenting - // so that constructors can set up the objects correclty. + // so that constructors can set up the objects correctly. $this->prototypes[$key] = $this->create($definition, NULL, $property_name, $object); }