Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This patch fixes the php 5.3 reference warning.
Please check to make sure this is a safe change.
Comment | File | Size | Author |
---|---|---|---|
cck-6.x-2.6-php53-1.patch | 1.05 KB | thekevinday |
Comments
Comment #1
thekevinday CreditAttribution: thekevinday commentedI want to emphasize: Please make sure that it is safe for me to remove the & at this location.
Comment #2
thekevinday CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: peternickson commentedCan someone please tell me how to apply the patch?