Skip to content

Undefined array key error relating to relationship field - EE 7.4.1 #4079

@jcogs-design

Description

@jcogs-design

Description of the problem
Getting a block of warnings errors on multiple pages on a site newly updated from EE4 to EE7.4.1
Site is running php 8.0.
Warnings appear to relate to a missing index being accessed by the entry method in Parser.php. Am guessing the remaining warnings are cascaded from this issue. Have done limited poking around and a value is passed as $id in this line (39) but the array $this->_entries does not contain a key with this value.

return $this->_entries[$id];

Error Messages


Warning
Undefined array key 27

ee/legacy/libraries/relationship_parser/Parser.php, line 39

    Severity: E_WARNING

Warning
Trying to access array offset on value of type null

ee/legacy/libraries/relationship_parser/Parser.php, line 664

    Severity: E_WARNING

Warning
Undefined array key 27

ee/legacy/libraries/relationship_parser/Parser.php, line 39

    Severity: E_WARNING

Warning
Trying to access array offset on value of type null

ee/legacy/libraries/relationship_parser/Parser.php, line 424

    Severity: E_WARNING

Warning
Trying to access array offset on value of type null

ee/legacy/libraries/relationship_parser/Parser.php, line 430

    Severity: E_WARNING

Warning
Trying to access array offset on value of type null

ee/legacy/libraries/relationship_parser/Parser.php, line 468

    Severity: E_WARNING

Screenshots / Videos / Template Code
image

Environment Details:

  • Version: 7.4.1
  • PHP Version 8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions