Index: search404.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/search404/search404.module,v
retrieving revision 1.15.2.7
diff -u -r1.15.2.7 search404.module
--- search404.module	22 May 2009 06:22:05 -0000	1.15.2.7
+++ search404.module	2 Jun 2009 12:10:28 -0000
@@ -38,7 +38,7 @@
   if (!empty($extensions) && preg_match("/\.($extensions)$/", $_REQUEST['destination'])) {
     return false;
   }
-  $keys = $_REQUEST['destination'];
+  $keys = $_REQUEST['destination'] ? $_REQUEST['destination'] : $_REQUEST['q'];
   $misc_var = variable_get('search404_regex', '');
   if (!empty($misc_var)) {
 	$keys = preg_grep($misc_var, $keys);

