On a fresh install I get the error

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in _webform_conditional_possible_trigger_components() (line 419 of .../sites/all/modules/webform_conditional/webform_conditional.module).

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in _webform_conditional_possible_trigger_components() (line 419 of /home/plymouthphoto/jaeruberto/sites/all/modules/webform_conditional/webform_conditional.module).

on the Webform Edit Component page.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jelle_S’s picture

I got the same error on a fresh d7 install

Turneight’s picture

Hi all,
from the php manual:
The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types.

I changed the line 419 in webform_conditional.module

- $get_component_types = array_merge($trigger_types, 'pagebreak', 'fieldset');
+ $get_component_types = array_merge($trigger_types, array('pagebreak'), array('fieldset'));

so it works

MrPhilbert’s picture

Thank you. Great save!

ahkiam’s picture

Thank you. I had the same error and this fixed it.

robertom’s picture

Status: Active » Needs review
FileSize
744 bytes
bayousoft’s picture

nice fix ! !

BrightBold’s picture

Awesome. This patch solved the problem for me.

tedbow’s picture

Status: Needs review » Closed (fixed)

@robertom,
Thanks for finding this. I had fixed this in D6 but not D7.
This is now in D7. Sorry, didn't get your "handle" in the on the commit message which I try to do.