Null references in dependencies

Created on 19 April 2021, over 3 years ago
Updated 6 September 2024, 22 days ago

Problem/Motivation

In some cases export contains references to a null objects, e.g. when referring to a parent of a zero-level taxonomy term.
Later, when import occurs, this results in a "Trying to access array offset on value of type null" warning, which generally passes silently except for some specific cases such as test env setup for PHPUnit.

Steps to reproduce

Create and export taxonomy term, try importing it on another env(or after deleting, so that import actually works).

Proposed resolution

Check contents of the $decoded['_embedded'] items before using them.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇦Ukraine Temoor

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024