FieldItemBase must check property definitions instead of already instantiated properties

Created on 24 January 2015, over 9 years ago
Updated 25 March 2024, 3 months ago

Problem/Motivation

\Drupal\Core\Field\FieldItemBase::__get() checks whether a typed data property with the given name exists in order to decided whether to store the value in a typed data property or the internal values array. However, it checks this by using the array of already instantiated properties, rather than checking whether a property with that name should exist through its property definitions.

Proposed resolution

Use the property definitions rather than the list of already instantiated properties.

Remaining tasks

None.

User interface changes

None.

API changes

None.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
FieldΒ  β†’

Last updated about 18 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • First commit to issue fork.
  • Merge request !7173Resolve #2413471 "D11" β†’ (Open) created by jackwrfuller
  • Pipeline finished with Failed
    3 months ago
    Total: 175s
    #128243
  • Pipeline finished with Failed
    3 months ago
    Total: 558s
    #128247
Production build 0.69.0 2024