FS#38323 - [php] incompatibilities with pcre 8.34
Attached to Project:
Arch Linux
Opened by Bruno Mathieu (bmathieu) - Monday, 30 December 2013, 15:20 GMT
Last edited by Pierre Schmitz (Pierre) - Thursday, 01 May 2014, 06:56 GMT
Opened by Bruno Mathieu (bmathieu) - Monday, 30 December 2013, 15:20 GMT
Last edited by Pierre Schmitz (Pierre) - Thursday, 01 May 2014, 06:56 GMT
|
Details
Description:
With pcre-8.34, the php preg_replace function makes some CMS buggy. Additional info: * package version(s) php 5.5.7-1 pcre 8.34-1 * config and/or log files etc. Standard php and pcre packages on x86_64 Steps to reproduce: <?php echo preg_replace('/[^._=-\w\d]+/', "_","un-essai!"); ?> With pcre 8.33, the regex compiles, and the script returns "un-essai_". With pcre 8.34, the function return nothing (empty string ?) and PHP warns me : PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 7 in - on line 2 |
This task depends upon
FS#38317?My problem wasn't with MediaWiki but whith SPIP :
http://core.spip.org/issues/3132#change-9181
I've explained my problem on the prce bug tracker here :
http://bugs.exim.org/show_bug.cgi?id=1429
In short :
A php application without a warning with libpcre 8.33 hangs now with this new release.
It would have been nicer and easier to track bugs if php had complained about such broken expression with pcre 8.33.
Maybe something like a php version which detects broken expressions and behaves like with pcre 8.33, but with a warning in the logs.