Fix against PHP warning; Notice: Array to string conversion
authorChanun Chirattikanon <chanun@gmail.com>
Mon, 30 Jan 2017 16:49:36 +0000 (16:49 +0000)
committerChanun Chirattikanon <chanun@gmail.com>
Mon, 30 Jan 2017 16:49:36 +0000 (16:49 +0000)
CRM/Contribute/Form/ContributionBase.php

index 8be7ccfad4cdb5f7a446a2c8333ce848549efa6d..317ead9c0e2210231b4b4183afbfd5b380cd6583 100644 (file)
@@ -633,7 +633,7 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
 
         //remove common fields only if profile is not configured for onbehalf/honor
         if (!in_array($profileContactType, array('honor', 'onbehalf'))) {
-          $fields = array_diff_assoc($fields, $this->_fields);
+          $fields = array_diff_key($fields, $this->_fields);
         }
 
         CRM_Core_BAO_Address::checkContactSharedAddressFields($fields, $contactID);