From: Ilia Alshanetsky Date: Thu, 4 Mar 2010 12:52:58 +0000 (+0000) Subject: Fixed bug #51190 (ftp_put() returns false when transfer was successful). X-Git-Tag: php-5.2.14RC1~115 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4043f2ef5264a13bc31db973a932b49b6ba82be;p=php Fixed bug #51190 (ftp_put() returns false when transfer was successful). --- diff --git a/NEWS b/NEWS index 938a6b8a8a..c92204be3e 100644 --- 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) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 578ee1b311..04852562e5 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -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;