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.
After upgrading to php 5.3 I started receiving this error:
warning: Parameter 2 to rules_admin_form_edit() expected to be a reference, value given in [site_path]/drupal-6.14/includes/form.inc on line 371.
To fix it I took the "&" off the &$proxy parameter on this line:
function rules_admin_form_edit(&$form_state, &$proxy, $element) {
Comment | File | Size | Author |
---|---|---|---|
#6 | rules-6.x-1.1-php53-1.patch | 635 bytes | thekevinday |
Comments
Comment #1
infojunkiesubscribe
Comment #2
askibinski CreditAttribution: askibinski commentedIn general, I believe it's a pretty bad idea to have a Drupal 6 site running on php 5.3 at this time. While core should work fine, many contrib modules will throw you warnings...
Comment #3
infojunkie@askibinski that's right, and that's why we must report the warnings and failures to module maintainers because we will all eventually need to upgrade to PHP 5.3 and beyond.
Comment #4
fagothanks, I fixed that warning. Please reopen if you find more problems.
Comment #6
thekevinday CreditAttribution: thekevinday commentedI recently came across another rules reference warning, this time with: rules_forms_form_alter
This patch fixes the newly discovered php 5.3 reference warning.
Please check to make sure this is a safe change.
edit: I want to emphasize: Please make sure that it is safe to remove the & at this location.
Comment #7
thekevinday CreditAttribution: thekevinday commentedMy patch may not be the correct fix, see my post here:
http://drupal.org/node/360605#comment-2340170
You may want to double check the original fix as well.
Comment #8
fagoThanks for spotting this. I think removing the reference was fine for the previous one, but in this case it's probably not. But I suppose hook_form_alter() is only called by core? So in that case it need to be fixed there.
Comment #10
spacereactor CreditAttribution: spacereactor commentedwhen i delete a rule from rule set, i got this error
warning: call_user_func_array() expects parameter 2 to be array, string given in /home/mysite/public_html/sites/all/modules/rules/rules/rules.module on line 851.
Comment #11
mitchell CreditAttribution: mitchell commented@spacereactor: Please create a new issue. This helps us stay organized and work with the many issues people post.
Comment #12
Renee S CreditAttribution: Renee S commented@spacereactor Issue and patch here: #878124: PHP5.3 warning: call_user_func_array() expects parameter 2 to be array