summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2010-03-04 12:52:58 +0000
committerIlia Alshanetsky <iliaa@php.net>2010-03-04 12:52:58 +0000
commit4db5175f54d4f7a47fef067a285fd867ab495315 (patch)
tree1658bc966faff0353bcda0ccc66c0b7156c4acf6
parentecae1f4923a5f92408a5ecccc0d6eb9b7d99da6b (diff)
downloadphp-git-4db5175f54d4f7a47fef067a285fd867ab495315.tar.gz
Fixed bug #51190 (ftp_put() returns false when transfer was successful).
-rw-r--r--NEWS2
-rw-r--r--ext/ftp/ftp.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index ad83d6e945..296b0909a4 100644
--- 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
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index de4d2553e3..d0239b6053 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;