Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
3.10.0, 3.9.4, 4.0.0
-
None
-
Operating System: Windows XP, Linux (Slackware 12)
PHP Version: 4.4.7, 5.2.5
Database and version: MySQL 4.1.12, 5.0.37
Browser (and version): MSIE 6.0, Firefox 2.0.2, Opera 9.25
Description
I have clean install of eZ publish plain_site (3.9.3, 3.10.0, 4.0.0) with unicode support and selected two languages in setup: rus-RU (as main), eng-GB.
When I have try to search any cyrillic text twice in search module, second attempt crashes eZ with following error message:
Fatal error: A database transaction in eZ Publish failed ... Error: eZMySQLDB Mar 10 2008 22:37:46 Query error: Duplicate entry '' for key 2. Query: INSERT INTO ezsearch_search_phrase ( phrase, phrase_count, result_count) VALUES ( '񂰵񃱂', 1, 0 ) ...
String value for 'phrase' column in sql insert command contains unrecognized symbols (show as squares).
Everything works perfectly when searching text contains only latin chars.
Steps to reproduce
I have created fix for this bug
kernel\classes\ezsearchlog.php - line 47:
... $phrase = strtolower( trim( $phrase ) ); ...
replacing "strtolower" call with "mb_strtolower" fixes this issue
Attachments
Issue Links
- duplicates
-
EZP-12428 strtolower() in eZSearchLog::addPhrase gives error for special char for e.g. ÅØÆ
- Closed