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.
The validation function added to the search block doesn't exist. Furthermore, since search validation happens in the submit handlers (interesting, isn't it!), there is no need for a validation function for this form.
diff -u -p -r1.258 search.module
--- search/search.module 26 May 2008 17:22:59 -0000 1.258
+++ search/search.module 9 Jul 2008 11:33:26 -0000
@@ -1069,7 +1069,6 @@ function search_box(&$form_state, $form_
);
$form['submit'] = array('#type' => 'submit', '#value' => t('Search'));
$form['#submit'][] = 'search_box_form_submit';
- $form['#validate'][] = 'search_box_form_validate';
return $form;
}
Comment | File | Size | Author |
---|---|---|---|
#2 | search.patch | 724 bytes | robertDouglass |
search.patch | 655 bytes | robertDouglass | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #2
robertDouglass CreditAttribution: robertDouglass commentedComment #3
douggreen CreditAttribution: douggreen commentedI confirm that the patch applies, and that it fixes a valid issue. I don't know if it's worth being committed, so I'm not marking it RTBC, without further discussion. Does having this in 6.x cause any problems?
Comment #4
c960657 CreditAttribution: c960657 commentedI think it deserves to be fixed. It may not be a big problem, but it does cause confusion for people reading the code, and the fix is trivial. The patch still applies.
Comment #5
Gábor HojtsyCommitted to Drupal 6, thanks.