Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
upload.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Jun 2011 at 09:30 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
damienmckennaFYI the bug was identified by AyumuKasuga: #1200982: nodewords_form_alter() and php 5.3
Comment #2
damienmckennaHere's a quick patch to change the second argument of hook_form_alter() for the upload module to a reference.
Comment #3
damienmckennaReviewing the full D6 codebase I've realized that all core implementations of hook_form_alter() are incorrect! Was this on purpose?
Comment #4
damienmckennaHere's a patch to fix all implementations of hook_form_alter() and hook_form_FORM_ID_alter().
Comment #6
ppblaauw commentedChanging this in the modules would for sites using PHP5.3 cause the following warnings:
warning: Parameter 2 to [modulename]_form_alter() expected to be a reference, value given in .\includes\common.inc on line 2829.
According to the API it should be
But the core modules you have in the patch in #4 and for example CCK don't pass $form_state by reference.
they use:
It is stated that PHP5.3 is supported for Drupal 6.14 and up, according to the system requirements page.
Should the API documentation be changed for Drupal 6?
Edit:See also http://drupal.org/node/649106 for an explanation
Comment #7
marciaj commented#4: drupal6-n1201042-upload_form_alter-4.patch queued for re-testing.