Running Drupal 6.x after upgrading from PHP 5.3 to PHP 5.4.

This error occurs when loggin in as Drupal Administrator:

Only variables should be passed by reference in /home/......../sites/all/modules/form_builder/modules/webform/form_builder_webform.components.inc on line 211.

------------form_builder_webform.components.inc on line 211 -----------------

/**
 * Implements _form_builder_webform_form_builder_load_component().
 */
function _form_builder_webform_form_builder_load_file($form_element) {
  // If we are loading a file element, _webform_render_file() adds some extra
  // structure (including several element children) that we don't want here.
  // Instead, we need the element itself to represent the file component
  // directly.

  $form_element['#type'] = 'file';
  unset($form_element['#theme']);
<strong>  $element_key = reset(element_children($form_element));</strong>
  $form_element = array_merge($form_element, $form_element[$element_key]);
  foreach (element_children($form_element) as $key) {
    unset($form_element[$key]);
  }
  $form_element['#required'] = !empty($form_element['#webform_required']);
  return $form_element;
}
CommentFileSizeAuthor
#2 form_builder-n2157759-2.patch759 bytesdamienmckenna

Comments

geerlingguy’s picture

Issue summary: View changes

Cleaned up the issue summary.

damienmckenna’s picture

Version: 6.x-1.3 » 6.x-1.x-dev
StatusFileSize
new759 bytes

This resolves the problem for D6.

damienmckenna’s picture

I checked and this specific error is not in the D7 branch, it's limited to the D6 branch.

damienmckenna’s picture

Status: Active » Needs review

Doh.

quicksketch’s picture

Status: Needs review » Fixed

Looks great. Thanks guys! Committed.

  • Commit bc56856 on 6.x-1.x by quicksketch:
    Issue #2157759 by DamienMcKenna: Only variables should be passed by...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.