Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
CCK in core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Dec 2009 at 16:49 UTC
Updated:
10 May 2010 at 00:40 UTC
Comments
Comment #1
thekevinday commentedI want to emphasize: Please make sure that it is safe for me to remove the & at this location.
Comment #2
thekevinday commentedMy patch may not be the correct fix, see my post here:
http://drupal.org/node/360605#comment-2340170
Comment #3
berdirSee #649132-3: php 5.3, this should not be necessary.
Comment #4
markus_petrux commentedRegardless of the fact that it could be a PHP 5.3 issue too, hook_form_alter() can only modify the first argument, so $form_state should not be declared as a by reference argument.
Fix committed to CVS. Thanks!
http://drupal.org/cvs?commit=297962 (CCK2)
http://drupal.org/cvs?commit=297966 (CCK3)
Comment #5
berdirNope, that is not correct. drupal_alter contains a hack that allows to have more than one by reference argument, see the huge comment at http://api.drupal.org/api/function/drupal_alter/6 and how it's called at http://api.drupal.org/api/function/drupal_prepare_form/6.
Of course, if you don't need to change $form_state, it is perfectly fine to remove the &. It's just your statement that isn't correct :)
Comment #6
markus_petrux commentedOops! You're right. Thanks for pointing this out. Anyway, content_copy_form_alter() does not need to modify the $form_state argument, so the patch should cause no harm.
Comment #8
peternickson commentedCan someone please tell me how to apply the patch?