]> granicus.if.org Git - php/commitdiff
Fixed bug #51190 (ftp_put() returns false when transfer was successful).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 4 Mar 2010 12:52:58 +0000 (12:52 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 4 Mar 2010 12:52:58 +0000 (12:52 +0000)
NEWS
ext/ftp/ftp.c

diff --git a/NEWS b/NEWS
index ad83d6e94574bac26e8bb908b35ccd9aa6ad93fd..296b0909a4eae2b77cb683cf1cc90574b5fac7a6 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ PHP                                                                        NEWS
 - Added stream filter support to mcrypt extension (ported from 
   mcrypt_filter). (Stas)
 
+- Fixed bug #51190 (ftp_put() returns false when transfer was successful).  
+  (Ilia)
 - Fixed bug #51176 (Static calling in non-static method behaves like $this->).
   (Felipe)
 - Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when    
index de4d2553e3d52b6998cf23867291261855626e24..d0239b6053e100b8fb283c9ffd86c0b3c6cdd15e 100644 (file)
@@ -948,7 +948,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i
        }
        ftp->data = data = data_close(ftp, data);
 
-       if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) {
+       if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250 && ftp->resp != 200)) {
                goto bail;
        }
        return 1;