Commit 92914245 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#169247 by profix898 slightly modified: fix E_NOTICE when form_id is not set...

#169247 by profix898 slightly modified: fix E_NOTICE when form_id is not set on a non-programmed form
parent f2ce877d
...@@ -295,7 +295,9 @@ function drupal_process_form($form_id, &$form, &$form_state) { ...@@ -295,7 +295,9 @@ function drupal_process_form($form_id, &$form, &$form_state) {
$form_state['values'] = array(); $form_state['values'] = array();
$form = form_builder($form_id, $form, $form_state); $form = form_builder($form_id, $form, $form_state);
if ((!empty($form['#programmed'])) || (!empty($form['#post']) && (($form['#post']['form_id'] == $form_id)))) { // Only process the form if it is programmed or the form_id coming
// from the POST data is set and matches the current form_id.
if ((!empty($form['#programmed'])) || (!empty($form['#post']) && (isset($form['#post']['form_id']) && ($form['#post']['form_id'] == $form_id)))) {
drupal_validate_form($form_id, $form, $form_state); drupal_validate_form($form_id, $form, $form_state);
if ((!empty($form_state['submitted'])) && !form_get_errors() && empty($form_state['rebuild'])) { if ((!empty($form_state['submitted'])) && !form_get_errors() && empty($form_state['rebuild'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment