已添加中文名支持
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.x00-xff]+$/';
但是在搜索中文名时,会发生错误。错误提示如下:
-------------------华丽的分割线---------------------
Warning: mysqli::query(): (HY000/3685): Illegal argument to a regular expression. in D:\wwwroot\192.168.200.254\photo\include\dblayer\functions_mysqli.inc.php on line 149
Warning: [mysql error 3685] Illegal argument to a regular expression.
SELECT
*
FROM piwigo_categories
INNER JOIN piwigo_user_cache_categories ON id = cat_id and user_id = 1
WHERE (name REGEXP '[[:<:]]测试[[:>:]]'
OR comment REGEXP '[[:<:]]测试[[:>:]]') in D:\wwwroot\192.168.200.254\photo\include\dblayer\functions_mysqli.inc.php on line 864
Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in D:\wwwroot\192.168.200.254\photo\include\dblayer\functions_mysqli.inc.php:228 Stack trace: #0 D:\wwwroot\192.168.200.254\photo\include\functions_search.inc.php(1143): pwg_db_fetch_assoc(false) #1 D:\wwwroot\192.168.200.254\photo\include\functions_search.inc.php(1396): qsearch_get_categories(Object(QExpression), Object(QResults)) #2 D:\wwwroot\192.168.200.254\photo\include\functions_search.inc.php(1313): get_quick_search_results_no_cache('\xE6\xB5\x8B\xE8\xAF\x95', Array) #3 D:\wwwroot\192.168.200.254\photo\include\functions_search.inc.php(1486): get_quick_search_results('\xE6\xB5\x8B\xE8\xAF\x95', Array) #4 D:\wwwroot\192.168.200.254\photo\include\section_init.inc.php(364): get_search_results('4', NULL) #5 D:\wwwroot\192.168.200.254\photo\index.php(12): include('D:\\wwwroot\\192....') #6 {main} thrown in D:\wwwroot\192.168.200.254\photo\include\dblayer\functions_mysqli.inc.php on line 228
-------------------华丽的分割线---------------------
请问以上问题是由于怎么原因造成的?目前有没有修正办法?
离线