diff --git a/customerror.module b/customerror.module
index e103cfe..76e27aa 100644
--- a/customerror.module
+++ b/customerror.module
@@ -272,7 +272,7 @@ function customerror_check_redirect() {
  * the error pages, otherwise the form POST's to the error page, bringing no
  * results page.
  */
-function customerror_form_alter($form_id, &$form) {
+function customerror_form_alter(&$form, &$form_state, $form_id) {
   switch ($form_id) {
     case 'search_theme_form':
       if (arg(0) == 'customerror')
