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;
 }

CommentFileSizeAuthor
#2 search.patch724 bytesrobertDouglass
search.patch655 bytesrobertDouglass
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

robertDouglass’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Patch (to be ported)
FileSize
724 bytes
douggreen’s picture

I 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?

c960657’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

I 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.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal 6, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.