Since #2211723: FieldInstance::__construct() loads all field_config entities, FieldInstanceConfig::$field is lazy-loaded in getFieldStorageDefinition(), and thus should never be accessed directly.
FieldInstanceConfig::postDelete() still has code that does that, though.

It works, because preDelete() happens to call getFieldStorageDefinition(), and thus $field is always populated when postDelete() runs - which also makes this not testable...

CommentFileSizeAuthor
#1 2295447-FIC_field-1.patch1.3 KByched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

FileSize
1.3 KB
yched’s picture

Issue summary: View changes
Berdir’s picture

Status: Active » Needs review
yched’s picture

Doh, thanks.

Green :-)

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Yes, looks fine, agreed that we can't really test this, as it's not possible to actually produce an error. More like a clean-up task, than a bugfix.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3c94e31 and pushed to 8.x. Thanks!

  • alexpott committed 3c94e31 on 8.x
    Issue #2295447 by yched: Fixed Leftover access to FieldInstanceConfig::$...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.