From: Andreas Treichel Date: Wed, 2 Aug 2017 17:26:29 +0000 (+0200) Subject: Default ftp_append() mode to FTPTYPE_IMAGE X-Git-Tag: php-7.3.0alpha1~1719 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27c225a5ad63b167615fcf8123874948950648a4;p=php Default ftp_append() mode to FTPTYPE_IMAGE To be consistent with other ftp_*() functions in master. --- diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 849e11bde0..3e4e84247d 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -1280,7 +1280,7 @@ PHP_FUNCTION(ftp_put) } /* }}} */ -/* {{{ proto bool ftp_append(resource stream, string remote_file, string local_file, int mode) +/* {{{ proto bool ftp_append(resource stream, string remote_file, string local_file [, int mode]) Append content of a file a another file on the FTP server */ PHP_FUNCTION(ftp_append) { @@ -1289,10 +1289,10 @@ PHP_FUNCTION(ftp_append) ftptype_t xtype; char *remote, *local; size_t remote_len, local_len; - zend_long mode; + zend_long mode=FTPTYPE_IMAGE; php_stream *instream; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "rppl", &z_ftp, &remote, &remote_len, &local, &local_len, &mode) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "rpp|l", &z_ftp, &remote, &remote_len, &local, &local_len, &mode) == FAILURE) { return; }