Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.0
-
Fix Version/s: 4.2.1
-
Component/s: CiviContribute
-
Labels:None
Description
Numerous errors in dblog whenever a contribution form is submitted, along the lines of:
Location http://mobikefed.org/civicrm/contribute/transact
Referrer http://mobikefed.org/civicrm/contribute/transact?_qf_Confirm_display=true&qfKey=a1b921527e4366e1df897d3f6d1d1d39_318
Message array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in XXX/XXX/www/sites/all/modules/civicrm/CRM/Utils/Hook.php on line 160.
The problem appears to be that function runHooks expects $fResult to be an array but functions like cd_civicrm_civicrm_pre return a number "1".
Example (at line 160, CRM/Utils/Hook.php):
$fnName=cd_civicrm_civicrm_pre
$result=Array ( )
$fResult= 1
This gives an error when $result = array_merge($result, $fResult); is attempted.
Backtrace
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Utils/Hook.php, backtrace, 161
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Utils/Hook/Drupal6.php, runHooks, 64
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Utils/Hook.php, invoke, 193
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php, pre, 1617
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Contribute/Form/Contribution/Confirm.php, createProfileContact, 770
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Core/Form.php, postProcess, 246
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Core/StateMachine.php, mainProcess, 159
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php, perform, 60
/home/mobikefed/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php, perform, 203
/home/mobikefed/www/www/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php, handle, 103
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Core/Controller.php, handle, 289
/home/mobikefed/www/www/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 228
/home/mobikefed/www/www/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 382
, civicrm_invoke,
/home/mobikefed/www/www/includes/menu.inc, call_user_func_array, 349
/home/mobikefed/www/www/index.php, menu_execute_active_handler, 17
This doesn't appear to break anything major but puts hundreds of similar errors into the log every time a contribution is submitted and may be breaking something behind the scenes that is not immediately noticeable.