mecachisenros / cf-civicrm

Caldera Forms CiviCRM Integration
GNU Affero General Public License v3.0
30 stars 26 forks source link

Array to string conversion error #194

Open shaneonabike opened 3 years ago

shaneonabike commented 3 years ago

Describe the bug When saving Caldera forms there is quite a few notices relating to the following:

PHP Notice: Array to string conversion in /wp-content/plugins/cf-civicrm/includes/class-civicrm-caldera-forms-forms.php on line 317

To Reproduce Steps to reproduce the behavior:

  1. Setup a form
  2. Add a CiviCRM Contact 1, Contact 2, Relationship, and two Address processors
  3. Save the form
  4. See error

Expected behavior I looked into it a bit more and it's a result of your call of A clear and concise description of what you expected to happen.

array_diff_assoc( $form['processors'], $contacts )

Apparently, when you have multidimensional arrays and perform a diff this issue will happen as a result, because it is not capable of performing the operation.