summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-08-23 18:02:52 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-08-23 18:02:52 +0000
commit92914245608123f9e011d1e9d4cf8c057bc9e8a8 (patch)
tree63d7002985ab2699940a376f406481cab14b210a /includes
parentf2ce877d43ce72173a8eaaee5ec76640fe2ab6c5 (diff)
downloadbrdo-92914245608123f9e011d1e9d4cf8c057bc9e8a8.tar.gz
brdo-92914245608123f9e011d1e9d4cf8c057bc9e8a8.tar.bz2
#169247 by profix898 slightly modified: fix E_NOTICE when form_id is not set on a non-programmed form
Diffstat (limited to 'includes')
-rw-r--r--includes/form.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 2392184d5..0bbc04867 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -295,7 +295,9 @@ function drupal_process_form($form_id, &$form, &$form_state) {
$form_state['values'] = array();
$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);
if ((!empty($form_state['submitted'])) && !form_get_errors() && empty($form_state['rebuild'])) {