Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0b4

Bug #18531 Multibyte characters not handled in prepare
Submitted: 2011-05-12 21:40 UTC
From: sdanzig Assigned:
Status: Open Package: MDB2_Driver_mysqli (version 1.4.1)
PHP Version: 5.3.0 OS: Windows XP SP 3
Roadmaps: (Not assigned)    
Subscription  


 [2011-05-12 21:40 UTC] sdanzig (Scott Danzig)
Description: ------------ When preparing a query with foreign characters, prepare fails. The prepare statement uses strpos to find the position of placeholders (in my case, question marks)..then uses simple array indexing to try to access this character. However, the memory representation is different from the string representation in the instance where some multibyte characters are used. I fixed this using mb_substr() in the 3 places where array indexing on the query is used in prepare().

Comments