ereg_replace returns wrong characters
| From: | Rui Hirokawa | Date: | Thu, 02 May 2002 07:42:41 +0000 |
| Subject: | ereg_replace returns wrong characters | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-5295@lists.php.net to get a copy of this message | ||
I think the bug #16969 is critical one because
it affects PHPlib's session id propagation in GET mode.
I made a patch to fix this problem.
Could I apply this fix for PHP 4.2.1RC1/PHP 4.3.0dev ?
-------------------------------------------------
Bug #16959: ereg_replace returns wrong characters
This is small script for testing.
<?php
$pat = "(^|&)foo(&|$)";
$string = "foo";
echo ereg_replace($pat, "\\1", $string);
?>
In PHP <= 4.1.x, this script returns empty string.
But, PHP 4.2.0 and PHP 4.2.1RC1 return '\1'.
The return value in PHP >= 4.2.0 should be corrected.
ereg_replace() is used for session id propagation in GET mode of PHPlib.
It is not work well because
it is affected by this problem.
--
-----------------------------------------------------
Rui Hirokawa <rui_hirokawa@ybb.ne.jp>
<hirokawa@php.net>
Attachment: [application/octet-stream] php-4.2.0-reg.patch
Attachment: [application/octet-stream] php-4.2.0-reg.patch