Bug #76471 [NEW]: PHP Warning: ftp_get() expects at least 4 parameters, 3 given

From: Date: Wed, 13 Jun 2018 15:04:26 +0000
Subject: Bug #76471 [NEW]: PHP Warning: ftp_get() expects at least 4 parameters, 3 given
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215697@lists.php.net to get a copy of this message
From: peter279k at gmail dot com Operating system: Ubuntu 16.04 PHP version: 7.0.30 Package: FTP related Bug Type: Bug Bug description:PHP Warning: ftp_get() expects at least 4 parameters, 3 given Description: ------------ As title, when I try to use the ftp_get function to develop my project. I also got the error message. When I refer the PHP official doc, it seems that the ftp_get can accept the three parameters expect, not 4. Is the official doc wrong? PHP official doc: http://php.net/manual/en/function.ftp-get.php Test script: --------------- <?php // define some variables $local_file = 'local.zip'; $server_file = 'server.zip'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to download $server_file and save to $local_file if (ftp_get($conn_id, $local_file, $server_file)) { echo "Successfully written to $local_file\n"; } else { echo "There was a problem\n"; } // close the connection ftp_close($conn_id); Expected result: ---------------- No error Actual result: -------------- PHP Warning: ftp_get() expects at least 4 parameters, 3 given -- Edit bug report at https://bugs.php.net/bug.php?id=76471&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76471&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76471&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76471&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76471&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76471&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76471&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76471&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76471&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76471&r=support Expected behavior: https://bugs.php.net/fix.php?id=76471&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76471&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76471&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76471&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76471&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76471&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76471&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76471&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76471&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76471&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76471&r=mysqlcfg

« previous php.bugs (#215697) next »