You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (Commented) (JIRA)" <ji...@apache.org> on 2011/11/16 16:30:52 UTC

[jira] [Commented] (THRIFT-1427) PHP library uses non-multibyte safe functions with mbstring function overloading

    [ https://issues.apache.org/jira/browse/THRIFT-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151262#comment-13151262 ] 

Jake Farrell commented on THRIFT-1427:
--------------------------------------

Bryan, I dont think that Thrift.php is the best place to put string utils like this into. would be better to have in a its own file, something like TStringUtils.php
                
> 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
>
>
> 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