Issue #3017710 by ndobromirov, joseph.olstad, Wim Leers, alexpott, Berdir, borisson_: Drupal\Core\TypedData\TypedData::getPropertyPath() is slow

merge-requests/3385/head
Alex Pott 2023-02-05 13:28:53 +00:00
parent aeac2967ce
commit 91e19e5c91
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 1 additions and 1 deletions

View File

@ -175,7 +175,7 @@ abstract class TypedData implements TypedDataInterface, PluginInspectionInterfac
// The property path of this data object is the parent's path appended
// by this object's name.
$prefix = $this->parent->getPropertyPath();
return (strlen($prefix) ? $prefix . '.' : '') . $this->name;
return $prefix !== '' ? "{$prefix}.{$this->name}" : $this->name;
}
// If no parent is set, this is the root of the data tree. Thus the property
// path equals the name of this data object.