ID: 41823 Updated by: [EMAIL PROTECTED] Reported By: rob at gravityswitch dot com Status: Feedback Bug Type: PCRE related Operating System: FreeBSD 6.2-RELEASE-p1 PHP Version: 5.2.3 New Comment:
Looks like yet another PCRE 7.0 regression, which is fixed by PCRE 7.2 (available in CVS version). At least I can't reproduce it here. Previous Comments: ------------------------------------------------------------------------ [2007-06-27 13:58:17] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2007-06-27 13:55:48] rob at gravityswitch dot com Description: ------------ This problem showed up after an upgrade to php 5.2.3 that was accompanied by a pcre upgrade to ver 7.0. It works fine on my local system (php 5.2.3, pcre 6.7) The browser returns a download dialog rather than an error. If I remove the "=" from the pattern, it works, but doesn't find anything. Reproduce code: --------------- <?php $s = "((?is-U)<input(?:(?:\s*\w*\s*(?:=(?:(?:'.*?')|(?:\".*?\")|(?:\w*)))?)*)(?:>|(?:\/>)))"; $formHTML = "Nothing to see here:<input name='blah' value=''></input>"; echo preg_replace("/" . $s . "/is", "muffin", $formHTML); ?> Expected result: ---------------- I would expect this code to replace the input tag string with "muffin". I would also expect it not to crash. Actual result: -------------- Download dialog box. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41823&edit=1
