From:             webmaster at crovortex dot com
Operating system: Win 98 SE
PHP version:      4.3.2
PHP Bug Type:     FTP related
Bug description:  ftp_rmdir() returns true on failure and false on success

Description:
------------
PHP distribution: php-4.3.2-Win32.zip
Apache dist: apache_2.0.47-win32-x86-no_ssl.msi

When deleting empty directories function ftp_rmdir() returns true on
failure and false on success, and according to the manual it should be the
other way around. I ran the same code on PHP 4.0.1 and it worked as it
should.

Reproduce code:
---------------
$test=1;
$remdir="non_existing_dir";
if(@ftp_rmdir($spoj,$remdir)) $test++;
echo "Test=$test<br>";
$remdir="existing_dir";
if(@ftp_rmdir($spoj,$remdir)) $test--;
echo "Test=$test<br>";

Expected result:
----------------
Test=1
Test=0


Actual result:
--------------
Test=2
Test=2

-- 
Edit bug report at http://bugs.php.net/?id=25065&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25065&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25065&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25065&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25065&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25065&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25065&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25065&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25065&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25065&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25065&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25065&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25065&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25065&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25065&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25065&r=gnused

Reply via email to