ZF-11752: CLONE - StringTrim works incorrect with UTF-8 strings

Issue Type: Patch Created: 2011-09-19T15:20:45.000+0000 Last Updated: 2011-09-25T09:07:22.000+0000 Status: Resolved Fix version(s): - Next Major Release ()

Reporter: Maxim Postoronca (max4ever) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter

Related issues: - ZF-11223



Zend/Filter/StringTrim.php: 122

return preg_replace("/$pattern/sSD", '', $value); => return preg_replace("/$pattern/sSDu", '', $value);

u (PCRE8) This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8.


Posted by Maxim Postoronca (max4ever) on 2011-09-19T15:21:52.000+0000

i've tested this and with zend 1.11.10 the row is return preg_replace("/$pattern/sSD", '', $value);

chaging it to return preg_replace("/$pattern/sSDu", '', $value);

fixes the problem

Posted by Maxim Postoronca (max4ever) on 2011-09-19T15:26:12.000+0000

reopened it, since it's so simple

Posted by Thomas Weidner (thomas) on 2011-09-25T09:07:22.000+0000

Already fixed in past

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.