summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGábor Hojtsy2011-07-27 08:08:28 (GMT)
committer Gábor Hojtsy2011-07-27 08:08:28 (GMT)
commit234fd93e373ce200af0c10879294b1835da62fbf (patch)
tree6f0ba57a3a8d47335188f298aec4d613e7653fa7
parent95df3c3959a371fa47c9b72858326fd59f0633a3 (diff)
Issue #925580 by tbenice, rsevero, marcp: dix upload modules's form altering to be clearly compatible with PHP 5.3
-rw-r--r--modules/upload/upload.module7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module
index f3e6251..3212ce9 100644
--- a/modules/upload/upload.module
+++ b/modules/upload/upload.module
@@ -624,7 +624,12 @@ function upload_js() {
'#tree' => FALSE,
'#parents' => array(),
);
- drupal_alter('form', $form, array(), 'upload_js');
+
+ $empty_form_state = array();
+ $data = &$form;
+ $data['__drupal_alter_by_ref'] = array(&$empty_form_state);
+ drupal_alter('form', $data, 'upload_js');
+
$form_state = array('submitted' => FALSE);
$form = form_builder('upload_js', $form, $form_state);
$output = theme('status_messages') . drupal_render($form);