[dev] [commits] Horde branch master updated. 5a07bd4b7067ab242d56010a954a8bea64f6962a
Michael M Slusarz
slusarz at horde.org
Wed Mar 4 05:24:21 UTC 2015
Quoting Jan Schneider <jan at horde.org>:
> Am 3. März 2015 07:50:48 MEZ, schrieb Michael M Slusarz <slusarz at horde.org>:
>> The branch "master" has been updated.
>> The following is a summary of the commits.
>>
>> from: d99e1901c2a4fbf3b39ff07b352270e83bdb2e8e
>>
>> 0972002 [mms] Fix error detection when using Horde_String::substr()
>> with mb_substr().
>
> What kind of locale string would have a valid substring of length 0?
> Can you please add a unit test for this?
Done.
Turns out the issue was actually with the error handling of the other
two PHP options when invalid input was given. In short... the old
behavior depended on which multibyte backend (mb_*, iconv, intl) you
used.
If any of these backends reports an error, the default must be to
return the empty string rather than returning an attempt to so
substring handling based on bytes only, since that result will never
be correct.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list