Re: [commits] Horde branch master updated. 5a07bd4b7067ab242d56010a954a8bea64f6962a

Michael M Slusarz <[email protected]>
Newsgroups gmane.comp.horde.devel
Message-ID <20150303222421.Horde.BKUmFgCHaoWqvQWI7OPrIbX@bigworm.curecanti.org>
Quoting Jan Schneider <[email protected]>:

> Am 3. März 2015 07:50:48 MEZ, schrieb Michael M Slusarz <[email protected]>:
>> 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 [[email protected]]

-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.