Possible Cause: A function got declared inside of another function
Developers and coders · Site administrators · Drupal 4.5.x or older · Drupal 4.6.x · Drupal 4.7.x · Drupal 5.x · Drupal 6.x · Drupal 7.x · No known problems
Last modified: September 25, 2009 - 16:14
Possible Cause:
A function got declared inside of another function (i.e. “}” in the wrong place)
function listing_form_alter($form_id, &$form){
if($form_id == 'listing_node_form'){
//do stuff
}
function listing_form(){
//do stuff
}//end listing_form
}//end listing_form_alterFix:
Move the function.
function listing_form_alter($form_id, &$form){
if($form_id == 'listing_node_form'){
//do stuff
}
}//end listing_form_alter
function listing_form(){
//do stuff
}//end listing_form