php: raw bytestrings vs. mb_string.func_overload and strlen

artemy tregoubenko me at arty.name
Tue Jan 15 04:24:35 PST 2008


Hello.

I use mb_string.func_overload in my utf-8 project. When I tried to
plug in openid consumer, I used gmp for bigmath, however I got timeout
errors in bigmath. Some research showed me that root of evil is
strlen() call in BigMath.php. It is used there to calculate length of
raw random bytestring. My mb_string.func_overload transparently
replaces strlen with mb_strlen, which gives great error on raw bytes.
As there may be more people with the same configuration, I attach
patch for this particular problem. However it only changes one file,
and there may be more code, working with raw bytes.

Hope this will make your great library even better! : )

-- 
arty ( http://arty.name )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: revision7726.diff
Type: application/octet-stream
Size: 782 bytes
Desc: not available
Url : http://lists.openidenabled.com/pipermail/dev/attachments/20080115/2f676339/attachment.obj 


More information about the Dev mailing list