PHP update, 2 chars in a regexp: search doesn’t function

Notice: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /mnt/web006/d0/10/52591910/htdocs/cc/wp-includes/functions.php on line 3888

Just experienced a problem on an old Drupal 6 installation I use for www.kindmankind.net. The search stopped working and complained that “you need a keyword of at least 3 chars”. As usual, I googled this sentence, and as usual, the answer popped up. In the file search-module.php, a few chars had to be changed. In case you have Drupal 6 and for no reason your side-wide search suddenly stopped working, here is the patch:

diff --git a/modules/search/search.module b/modules/search/search.module
index cb6d0f7..fbd4438 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -43,7 +43,7 @@ define('PREG_CLASS_SEARCH_EXCLUDE',
'\x{2ce5}-\x{2cff}\x{2d6f}\x{2e00}-\x{3005}\x{3007}-\x{303b}\x{303d}-\x{303f}'.
'\x{3099}-\x{309e}\x{30a0}\x{30fb}\x{30fd}\x{30fe}\x{3190}-\x{319f}\x{31c0}-'.
'\x{31cf}\x{3200}-\x{33ff}\x{4dc0}-\x{4dff}\x{a015}\x{a490}-\x{a716}\x{a802}'.
-'\x{a806}\x{a80b}\x{a823}-\x{a82b}\x{d800}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}'.
+'\x{a806}\x{a80b}\x{a823}-\x{a82b}\x{e000}-\x{f8ff}\x{fb1e}\x{fb29}\x{fd3e}'.
'\x{fd3f}\x{fdfc}-\x{fe6b}\x{feff}-\x{ff0f}\x{ff1a}-\x{ff20}\x{ff3b}-\x{ff40}'.
'\x{ff5b}-\x{ff65}\x{ff70}\x{ff9e}\x{ff9f}\x{ffe0}-\x{fffd}');

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.