]> granicus.if.org Git - php/commitdiff
Default ftp_append() mode to FTPTYPE_IMAGE
authorAndreas Treichel <gmblar+github@gmail.com>
Wed, 2 Aug 2017 17:26:29 +0000 (19:26 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 2 Aug 2017 18:54:32 +0000 (20:54 +0200)
To be consistent with other ftp_*() functions in master.

ext/ftp/php_ftp.c

index 849e11bde0e809c6a0212e9e75e6fe4f83a0851c..3e4e84247dadba5ee9bcf27c484fa47988305c7c 100644 (file)
@@ -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;
        }