The NestedArray::unsetValue() page shows the following sentence.

Instead, use this helper function:

NestedArray::unset_nested_value($form, $parents, $element);

The method name isn't correct. It's NestedArray::unsetValue().

Comments

apaderno created an issue. See original summary.

avpaderno’s picture

Version: 9.3.x-dev » 9.4.x-dev
Status: Active » Needs review
StatusFileSize
new644 bytes

I checked the file, and that is the only reference to a wrong method name.
I created the patch for Drupal 9.4.x. I cannot link the documentation for that Drupal version, as a.d.o doesn't have documentation for Drupal 9.4.x.

vicheldt’s picture

Assigned: Unassigned » vicheldt

I will review this issue

vicheldt’s picture

Assigned: vicheldt » Unassigned
Status: Needs review » Reviewed & tested by the community

Just read the documentation, I think it is ok, there's nowhere else in this file that says unset_nested_value.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: drupal-correct-method-name-3249859-2.patch, failed testing. View results

avpaderno’s picture

Status: Needs work » Reviewed & tested by the community

None of the errors reported for the tests are caused by this patch, since it's not changing any schema.

alexpott’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 1752de41acf to 10.0.x and 7aa1ef1d81b to 9.4.x and 543dc50b1ed to 9.3.x. Thanks!

  • alexpott committed 1752de4 on 10.0.x
    Issue #3249859 by apaderno: The documentation page for NestedArray::...

  • alexpott committed 7aa1ef1 on 9.4.x
    Issue #3249859 by apaderno: The documentation page for NestedArray::...

  • alexpott committed 543dc50 on 9.3.x
    Issue #3249859 by apaderno: The documentation page for NestedArray::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.