Ask a Question related to PHP Bugs, Design and Development.
-
a at b dot c dot de #1
#39112 [NEW]: Typographical error in error message
From: a at b dot c dot de
Operating system: Windows XP
PHP version: 5.1.6
PHP Bug Type: PCRE related
Bug description: Typographical error in error message
Description:
------------
The Warning: level message that is triggered by preg_replace() when the
pattern is a string, but the replacement is an array has one or two typos:
"in" instead of "is", and a full stop that looks out of place.
Reproduce code:
---------------
<?php
$pattern = "/foo/";
$replacement = array('bar','baz');
$string = "Womble";
preg_replace($pattern, $replacement, $string);
?>
Expected result:
----------------
Warning: preg_replace(): Parameter mismatch, pattern is a string while
replacement is an array in C:\test.php on line 8
Actual result:
--------------
Warning: preg_replace(): Parameter mismatch, pattern is a string while
replacement in an array. in C:\test.php on line 8
--
Edit bug report at [url]http://bugs.php.net/?id=39112&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39112&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39112&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=39112&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=39112&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39112&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=39112&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=39112&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=39112&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=39112&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=39112&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=39112&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39112&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=39112&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=39112&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39112&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=39112&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39112&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39112&r=mysqlcfg[/url]
a at b dot c dot de Guest
-
Help! Can not save anything in Illustrator format - Error message "unknown error has occured"
I am using Illustrator CS on XP, I was trying to save my work, it was a template and about 10 layers. I got the error message "unknown error has... -
error message: Microsoft JScript compilation error '800a03ec'
Recieved following error message: Microsoft JScript compilation error '800a03ec' Expected ';' ... -
Error Message When Sending Message In Windows Mail
Am I the only one getting an error message when replying to a posted message using Windows Mail. Every time I send a message I get a popup error... -
Error Message "A drawing error ocurrred which is probably due to an out-of-memory condition. Try qu
I am running Acrobat Reader 5.0 on a Mac Powerbook running OS 9.2 and keep getting "A drawing error occurred which is probably due to an out of... -
ODBC has error but no error message displayed
Hi All.. This is a strange one that I hope someone has come across. I have an asp.net application that needs to access a flat file databse via... -
tony2001@php.net #2
#39112 [Opn->Csd]: Typographical error in error message
ID: 39112
Updated by: [email]tony2001@php.net[/email]
Reported By: a at b dot c dot de
-Status: Open
+Status: Closed
Bug Type: PCRE related
Operating System: Windows XP
PHP Version: 5.1.6
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
[url]http://snaps.php.net/[/url].
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-10-10 12:25:45] a at b dot c dot de
Description:
------------
The Warning: level message that is triggered by preg_replace() when the
pattern is a string, but the replacement is an array has one or two
typos: "in" instead of "is", and a full stop that looks out of place.
Reproduce code:
---------------
<?php
$pattern = "/foo/";
$replacement = array('bar','baz');
$string = "Womble";
preg_replace($pattern, $replacement, $string);
?>
Expected result:
----------------
Warning: preg_replace(): Parameter mismatch, pattern is a string while
replacement is an array in C:\test.php on line 8
Actual result:
--------------
Warning: preg_replace(): Parameter mismatch, pattern is a string while
replacement in an array. in C:\test.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39112&edit=1[/url]
tony2001@php.net Guest



Reply With Quote

