backdrop-contrib / entity_plus

This module wraps in a variety of additional entity-related functionality from various sources. Partial port of D7 Entity API.
https://backdropcms.org/project/entity_plus
GNU General Public License v2.0
3 stars 11 forks source link

Warning: Undefined array key "name" #169

Open laryn opened 7 months ago

laryn commented 7 months ago

I'm working on a port of a module from Drupal 7 and see this:

Warning: Undefined array key "name" in EntityMetadataWrapper->__toString() (line 164 of /var/www/html/modules/contrib/entity_plus/includes/entity_plus.wrapper.inc).

Maybe we just need to change the line from

return isset($this->info) ? 'Property ' . $this->info['name'] : $this->type;

to

return isset($this->info['name']) ? 'Property ' . $this->info['name'] : $this->type;