ZF2-397: preg_match fails in isUtf8() method from Escaper class

Issue Type: Bug Created: 2012-07-16T07:06:00.000+0000 Last Updated: 2012-08-15T06:39:36.000+0000 Status: Resolved Fix version(s): Reporter: Jaepil (jpkim) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\View

  • escaper
  • utf8
  • zf2

Related issues: Attachments:


When using Beta5's escapeHtml or escapeHtmlAttr helpers, the preg_match() function fails with the following error message.

<pre class="highlight">
preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /var/www/html/vendor/zendframework/zendframework/library/Zend/Escaper/Escaper.php on line 349

<pre class="highlight">
Line 349: } elseif (preg_match('/^./su', $string) == 1) {

The server is running with PCRE version 7.8 with UTF-8 & Unicode support on.

<pre class="highlight">
PCRE version 7.8 2008-09-05
Compiled with
  UTF-8 support
  Unicode properties support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack


Posted by Maks 3w (maks3w) on 2012-08-15T06:39:36.000+0000

ZF2 requires PHP 5.3 which is shipped with PCRE 7.9

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.