When adding state handlers with more complex return structures (nested arrays), you'll get the error "Array to string conversion in conditional_fields_form_after_build() line 535.".

This is not (really) the fault of Conditional fields: array_intersect_assoc() simply can't handle multi-dimensional arrays correctly. See http://stackoverflow.com/q/4627076 for further reference.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stBorchert created an issue. See original summary.

stBorchert’s picture

Status: Active » Needs review
FileSize
1.55 KB

Adding custom function to intersect multi-dimensional arrays.

Arlina’s picture

Status: Needs review » Reviewed & tested by the community

Tested #2, and it works with 7.x-3.0-alpha2.

madelyncruz’s picture

Patch #2 works with 7.x-3.x-dev

biarr’s picture

Patch #2 fixed the problem.

Anonymous’s picture

Patch #2 works for me
thanks.

Steve@ASU’s picture

Has this patch been put into a release?

sano’s picture

@Steve@ASU the answer is no. But the patch solves the issue.

Chris Charlton’s picture

+1 patch.

delacosta456’s picture

hi
Many thanks patch worked for me too on D7(current day)+Panopply Distro+php7.1

dqd’s picture

Will review and test ...

dqd’s picture

Works with latest 7.x dev

  • dqd committed 851dfb2a on 7.x-3.x authored by stBorchert
    Issue #2682015 by stBorchert, dqd, Arlina: Array to string conversion in...
dqd’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for all the reports, efforts, and hard work in here. +1 Committed to latest dev. Hope it still helps someone out there but please consider EOL for Drupal 7 soon.

Status: Fixed » Closed (fixed)

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