ZF2-397: preg_match fails in isUtf8() method from Escaper class
Description
When using Beta5's escapeHtml or escapeHtmlAttr helpers, the preg_match() function fails with the following error message.
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
Line 349: } elseif (preg_match('/^./su', $string) == 1) {
The server is running with PCRE version 7.8 with UTF-8 & Unicode support on.
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
Comments
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