[ https://issues.apache.org/jira/browse/THRIFT-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Alves updated THRIFT-1427: -------------------------------- Attachment: thrift_mbstring.patch Here is an updated patch that moves the relevant string utility functions to their own file. > PHP library uses non-multibyte safe functions with mbstring function > overloading > -------------------------------------------------------------------------------- > > Key: THRIFT-1427 > URL: https://issues.apache.org/jira/browse/THRIFT-1427 > Project: Thrift > Issue Type: Bug > Components: PHP - Library > Affects Versions: 0.7 > Environment: PHP 5.2.6 > Reporter: Bryan Alves > Priority: Minor > Labels: patch, php > Attachments: thrift_mbstring.patch, thrift_mbstring.patch.ORIG > > > The PHP library uses strlen() and substr() liberally. These functions can be > overriden by mbstring with the config "mbstring.func_overload" > (http://us.php.net/manual/en/mbstring.overload.php). > When this overloading happens, substr and strlen (among other non-important > functions) are no longer binary-safe, and need to be replaced with their mb_* > binary safe equivalents. > Attached is a patch that identifies environments where > mbstring.func_overloading is set, and automatically switches over use of the > non-binarysafe functions to their safe equivalents. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira