Bug #10498 [NEW]: extra symbols are appended to patches
| From: | techtonik at php dot net | Date: | Sun, 25 Mar 2007 18:24:08 +0000 |
| Subject: | Bug #10498 [NEW]: extra symbols are appended to patches | ||
| Groups: | php.pear.webmaster | ||
| Request: | Send a blank email to pear-webmaster+get-5814@lists.php.net to get a copy of this message | ||
From: techtonik
Operating system:
Package version:
PHP version: Irrelevant
Package: Bug System
Bug Type: Bug
Bug description: extra symbols are appended to patches
Description:
------------
When downloading patches extra symbols that looks like file size are added
to the end.
http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=latest
Also wget doesn't restore original file name, but I can't say which bug is
this one.
Test script:
---------------
$ wget
"http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1"
--11:17:26--
http://pear.php.net/bugs/patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1
=>
`patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1'
Resolving pear.php.net... 216.92.131.66
Connecting to pear.php.net[216.92.131.66]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 518 [application/octet-stream]
100%[==================================================================================>]
521 --.--K/s
11:17:26 (4.97 MB/s) -
`patch-display.php?bug=10395&patch=quicksearch_patch&revision=1174306336&download=1'
saved [521/518])
$ cat
patch-display.php\?bug\=10395\&patch\=quicksearch_patch\&revision\=1174306336\&download\=1
Expected result:
----------------
--- SearchReplace_old.php Mon Mar 19 12:48:40 2007
+++ SearchReplace.php Mon Mar 19 14:09:52 2007
@@ -332,7 +332,7 @@
// because I haven't decided yet whether it is bug or feature)
if ($this->php5) {
- $file_array[$i] = str_replace($this->find, $this->replace,
$file_array[$i], $counted);
+ $file = str_replace($this->find, $this->replace, $file,
$counted);
$occurences += $counted;
} else {
foreach ($local_find as $fk => $ff) {
Actual result:
--------------
--- SearchReplace_old.php Mon Mar 19 12:48:40 2007
+++ SearchReplace.php Mon Mar 19 14:09:52 2007
@@ -332,7 +332,7 @@
// because I haven't decided yet whether it is bug or feature)
if ($this->php5) {
- $file_array[$i] = str_replace($this->find, $this->replace,
$file_array[$i], $counted);
+ $file = str_replace($this->find, $this->replace, $file,
$counted);
$occurences += $counted;
} else {
foreach ($local_find as $fk => $ff) {
518
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=10498&edit=1
--