ID: 25042
User updated by: michiel at tincan dot co dot uk
Reported By: michiel at tincan dot co dot uk
Status: Bogus
Bug Type: PCRE related
Operating System: Linux
PHP Version: 4.3.2
New Comment:
thanks. that's great. Just curious, was that already fixed, or did you
fix it just now?
Previous Comments:
------------------------------------------------------------------------
[2003-08-12 09:18:41] [EMAIL PROTECTED]
With latest CVS snapshot, it errors out and doesn't do anything.
------------------------------------------------------------------------
[2003-08-12 09:12:20] michiel at tincan dot co dot uk
Yes, exactly.
It errors out and does nothing in the latter case.
My bug is that it doesn't error out, but does something, ie it wipes
the string. Sorry, maybe I don't get it, but I haven't been convinced
about the bogus-ness of this bug yet.
------------------------------------------------------------------------
[2003-08-12 09:06:01] [EMAIL PROTECTED]
>From the friendly manual page for preg_replace():
"If pattern is an array and replacement is a string, then this
replacement string is used for every value of pattern. The converse
would not make sense, though."
It errors out and does nothing in the latter case.
------------------------------------------------------------------------
[2003-08-12 04:12:38] michiel at tincan dot co dot uk
Well, you may have tagged it bogus, but it's no use to have a
"Warning", when the behaviour should be different. The pattern is not
matched so regardless of the (type and value of the) replacement, the
replacement should not take place. So I still think this is a bug.
------------------------------------------------------------------------
[2003-08-11 11:45:31] [EMAIL PROTECTED]
Try increasing your error_reporting level:
Warning: preg_replace(): Parameter mismatch, pattern is a string while
replacement in an array.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/25042
--
Edit this bug report at http://bugs.php.net/?id=25042&edit=1