The unchanged values stored into $form['#signup'] while editing a signup are altered together with the submitted values, since the $signup variable holds an object reference in PHP5. This causes troubles to Signup status which cannot tell if a status has changed and perform the needed actions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Needs review
FileSize
594 bytes

Cloning the $signup object before altering it does the trick.

This is present in both the 7.x and 6.x branches and needs backport.

Jerenus’s picture

Status: Needs review » Needs work

I saw the line drupal_clone here.
This will causes an error if called because it has been removed in drupal 7.
This drupal_clone function was used to provide a substitute clone() function for PHP4.
We need a new patch here.

 function signup_edit_form_save_submit($form, $form_state) {
-  $signup = $form['#signup'];
+  $signup = clone($form['#signup']);
   if (!empty($form_state['values']['signup_form_data'])) {
     $signup->form_data = $form_state['values']['signup_form_data'];
   }
Jerenus’s picture

Status: Needs work » Needs review
FileSize
945 bytes

patch here.