Closed (fixed)
Project:
Form email confirmation
Version:
6.x-1.0-beta6
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2011 at 17:59 UTC
Updated:
8 Dec 2011 at 18:10 UTC
This fails on PHP 5.3 because call_user_func_array() has changed its behaviour.
$drupal_execute_params = array_merge(array($stored_form_id, $stored_form_state), $stored_form_params);
call_user_func_array('drupal_execute', $drupal_execute_params);
It produces a warning, though doesn't actually call the function -- so drupal_execute() is not called, the form is not submitted, and nothing happens.
The fix, found at http://stackoverflow.com/questions/2045875/pass-by-reference-problem-wit..., http://www.arthurrichards.net/node/19 and other places, is to pass by reference, just as is now supposedly deprecated! O_o
Hence:
$drupal_execute_params = array_merge(array(&$stored_form_id, &$stored_form_state), $stored_form_params);
call_user_func_array('drupal_execute', $drupal_execute_params);
This doesn't break PHP 5.2, fortunately!
Comments
Comment #1
joachim commented