Commit 1eb9c487 authored by fago's avatar fago

Issue #1917538 Avoid notices if no metadata is defined for the label property.

parent 970fb593
......@@ -253,7 +253,8 @@ class Entity {
*/
public function getTranslation($property, $langcode = NULL) {
$all_info = entity_get_all_property_info($this->entityType);
$property_info = $all_info[$property];
// Assign by reference to avoid triggering notices if metadata is missing.
$property_info = &$all_info[$property];
if (!empty($property_info['translatable'])) {
if (!empty($property_info['field'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment