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.
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_alter
Fix:
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