From: mchizewski at yahoo dot com Operating system: Windows 2000 SP 3 PHP version: 5.0.0RC3 PHP Bug Type: FTP related Bug description: ftp_chdir issues Warning when Failed to change directory. No error required.
Description: ------------ When ftp_chdir cannot change directory, it produces the following PHP warning. Warning: ftp_chdir()[http://www.php.net/manual/en/function.ftp-chdir]: Failed to change directory. in C:\Documents and Settings\(...)\ftp.php on line 137 If ftp_chdir cannot change the directory, it should do as the documentation says and just return false. "Returns TRUE on success or FALSE on failure." Reproduce code: --------------- // code as part of a ftp class function change_ftp_directory () { if ($this -> ftp_login === false) { return false; } $this -> change_ftp_directory = ftp_chdir ($this -> ftp_resource, $this -> ftp_path); if ($this -> change_ftp_directory === false) { return false; } return true; } Expected result: ---------------- It returns false if the change directory path is bad. No PHP error reported. Actual result: -------------- Warning: ftp_chdir()[http://www.php.net/manual/en/function.ftp-chdir]: Failed to change directory. in C:\Documents and Settings\(...)\ftp.php on line 137 -- Edit bug report at http://bugs.php.net/?id=28907&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28907&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28907&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28907&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28907&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28907&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28907&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28907&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28907&r=support Expected behavior: http://bugs.php.net/fix.php?id=28907&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28907&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28907&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28907&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28907&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28907&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28907&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28907&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28907&r=float