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.
I use PHP 5.3 and get errors on form submit -
* warning: Parameter 2 to hierarchical_select_form_alter() expected to be a reference, value given in /home/sitedir/includes/common.inc on line 2883.
I found that error is in PHP 5.3 incompatibility. On other site with 5.2 all works fine.
/**
* Implementation of hook_form_alter().
*/
function hierarchical_select_form_alter(&$form, &$form_state, $form_id) {
if (_hierarchical_select_form_has_hierarchical_select($form)) {
$form['#after_build'][] = 'hierarchical_select_after_build';
}
}
So, I found that to solve this errors the module needs to be pathed like this:
- function hierarchical_select_form_alter(&$form, &$form_state, $form_id) {
+ function hierarchical_select_form_alter($form, $form_state, $form_id) {
am I right?
Comments
Comment #1
Wim LeersNo, that's wrong.
This is right:
I'll get that committed :)
Comment #2
Wim LeersNo, that's wrong.
This is right:
I'll get that committed :)
Comment #3
yultyyev CreditAttribution: yultyyev commentedok, so I go to open more issues on other modules - when I testing my site on PHP 5.3 and get about 3-5 error for other popular module.
Comment #4
kolyas12 CreditAttribution: kolyas12 commentedalso:
Comment #5
Wim LeersCommitted.
http://drupal.org/cvs?commit=494988