FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17901&edit=1

ID: 17901
Updated by: helgith@gmail.com
Reported By: mp at webfactory dot de
Summary: PEAR_FTP reports error on empty files
Status: Open
Type: Bug
-Package: PEAR
+Package: PEAR_RemoteInstaller
Operating System: irrelevant
Package Version: 1.9.1
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

-Package: PEAR
+Package: PEAR_RemoteInstaller
Moving to the proper package. FTP support doesn't come native with PEAR.


Previous Comments:
------------------------------------------------------------------------

[2010-09-28 10:14:25] mpdude

Description:
------------
For example when remote-install'ing Net_FTP, an emtpy "testfile.dat" is
to be transferred. PEAR_FTP reports an error for this file although the
transfer succeeded.

Suggested fix:
--- FTP.php.orig 2010-09-28 12:06:32.000000000 +0200
+++ FTP.php 2010-09-28 12:08:27.000000000 +0200
@@ -231,7 +231,7 @@
if ($remote) {
@fclose($remote);
}
- return $ret ? $ret : PEAR::raiseError('FTP put of ' .
$this->_prepend($remotefile) .
+ return ($ret || filesize($localfile) == 0) ? $ret :
PEAR::raiseError('FTP put of ' . $this->_prepend($remotefile) .
' failed');
}

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 29, '10 at 11:16p
activeSep 29, '10 at 11:16p
posts1
users1
websitepear.php.net

1 user in discussion

Helgith: 1 post

People

Translate

site design / logo © 2022 Grokbase