ZF-11533: StringTrim works incorrect with UTF-8 strings

Issue Type: Patch Created: 2011-07-06T14:39:21.000+0000 Last Updated: 2012-04-11T13:58:54.000+0000 Status: Resolved Fix version(s): - Next Major Release ()

Reporter: Sergey Boiko (silex) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter

Related issues: - ZF-10891



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 Thomas Weidner (thomas) on 2011-07-24T20:46:14.000+0000

This issue duplicates ZF-10891

Posted by Thomas Weidner (thomas) on 2011-07-24T20:46:58.000+0000

This issue has been fixed with GH-107

Posted by Leonid (volhovec) on 2012-04-11T13:58:54.000+0000

Zend Framework minimal version 1.11.11 Same error. Version of the StringTrim.php yonger than the message about fix - * @version $Id: StringTrim.php 23775 2011-03-01 17:25:24Z ralph $

Preg_replace - return preg_replace("/$pattern/sSD", '', $value); - without latter u

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.