- π¨π¦Canada nedjo
Thanks for reporting the error.
The reported error suggests that, in certain situations, the
$field
argument passed tofield_collection_field_get_path()
may beNULL
rather than the expected the expected array. The proposed patch in #3 π PHP 7.4, PHP 8.0, PHP 8.1 - array offset on value of type null in field_collection_field_get_path() RTBC looks to handle the case where a field name string (notNULL
) might be passed in, and so doesn't appear to address the reported error.In any case, it looks like any non-array argument value would be an error, so an expected fix would be in the calling code rather than in this function.
From a quick glance, it's not immediately obvious how calling code could end up passing in a
NULL
value. So before work could be done here, it would be necessary to provide steps to reproduce. Postponing accordingly. - πΊπΈUnited States sgroundwater
I may have been seeing a similar error when running on PHP 8.x.
Attached is a patch to correct.
Warning: Trying to access array offset on value of type null in field_collection_feeds_presave()
(line 2508 of ... /sites/all/modules/field_collection/field_collection.module). - Status changed to Needs review
over 1 year ago 8:14pm 10 July 2023 - last update
over 1 year ago Patch Failed to Apply - Status changed to RTBC
over 1 year ago 8:21pm 10 July 2023 - π¨π¦Canada joseph.olstad
test failures are not related to this patch, see the no change tests above
- last update
over 1 year ago 12 pass, 3 fail - last update
over 1 year ago 12 pass, 3 fail The last submitted patch, 20: 3301659-20.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.The last submitted patch, 21: 3301659-21.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- π¨π¦Canada joseph.olstad
failures are unrelated to the patch, there's 3 fails in head, this patch is needed.
- π¨π¦Canada joseph.olstad
The codesniffer patch is going to break backwards compatibility, please commit patch #21