I had this error when trying to import some new menu-items. It may have to do with malformed data on my end, but with a couple simple changes I was able to get it to run. Including a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3284649-array-error-03.patch | 1.22 KB | ayrmax |
| #2 | 3284649-array-error.patch | 1.22 KB | d0t15t |
| set_author_error.png | 923.5 KB | d0t15t |
Comments
Comment #2
d0t15t commentedComment #3
ayrmax commentedYour patch fixes the issue but still produces a notice because we still access array index 0 even though there is none:
$prepared_field_data = EntityShareUtility::prepareData($field_data['data'] ?? [])[0];I updated the patch to fix the notice.
Comment #4
jurgenhaasThis got fixed in the 1.2.0 release.