]> 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 938a6b8a8a65005df20dd32d13576a31ea087959..c92204be3ef3d87155cbe51268b29bf4c424ff8e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ PHP                                                                        NEWS
 
 - Fixed bug #51192 (FILTER_VALIDATE_URL will invalidate a hostname that
   includes '-'). (Adam, solar at azrael dot ws).
+- Fixed bug #51190 (ftp_put() returns false when transfer was successful).
+  (Ilia)
 - Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when 
   an invalid option is provided). (Ilia)
 - Fixed bug #43314 (iconv_mime_encode(), broken Q scheme). (Rasmus)
index 578ee1b3119aecdf4b526c945bbe7e2d6a56ff15..04852562e59e2d5537aa025ef2d77e8ae3747c26 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;