diff options
author | Derick Rethans <github@derickrethans.nl> | 2014-01-02 10:57:46 +0000 |
---|---|---|
committer | Derick Rethans <github@derickrethans.nl> | 2014-01-02 10:57:46 +0000 |
commit | dee77f237c7989359986f5020d450c1b9a93464c (patch) | |
tree | 0b8de5050f07364b3fcb03fa420686505947dc79 /ext/ftp/php_ftp.c | |
parent | e881334e496be92ac6d1751f25d006203f3229d6 (diff) | |
parent | 3c3ff434329d2f505b00a79bacfdef95ca96f0d2 (diff) | |
download | php-git-dee77f237c7989359986f5020d450c1b9a93464c.tar.gz |
Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
Diffstat (limited to 'ext/ftp/php_ftp.c')
-rw-r--r-- | ext/ftp/php_ftp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 21e13ea460..99f3808c38 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -963,6 +963,7 @@ PHP_FUNCTION(ftp_nb_get) if ((ret = ftp_nb_get(ftp, outstream, remote, xtype, resumepos TSRMLS_CC)) == PHP_FTP_FAILED) { php_stream_close(outstream); + ftp->stream = NULL; VCWD_UNLINK(local); php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ftp->inbuf); RETURN_LONG(PHP_FTP_FAILED); @@ -970,6 +971,7 @@ PHP_FUNCTION(ftp_nb_get) if (ret == PHP_FTP_FINISHED){ php_stream_close(outstream); + ftp->stream = NULL; } RETURN_LONG(ret); @@ -1003,6 +1005,7 @@ PHP_FUNCTION(ftp_nb_continue) if (ret != PHP_FTP_MOREDATA && ftp->closestream) { php_stream_close(ftp->stream); + ftp->stream = NULL; } if (ret == PHP_FTP_FAILED) { @@ -1214,6 +1217,7 @@ PHP_FUNCTION(ftp_nb_put) if (ret != PHP_FTP_MOREDATA) { php_stream_close(instream); + ftp->stream = NULL; } if (ret == PHP_FTP_FAILED) { |