Edit report at http://bugs.php.net/bug.php?id=41354&edit=1
ID: 41354 Updated by: [email protected] Reported by: cbutler at technophobia dot co dot uk Summary: rename() file not found error message is ambigous -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Debian GNU/Linux PHP Version: 5.2.2 Block user comment: N Private report: N New Comment: The error is caused by the operating system. We can't be more precise. Previous Comments: ------------------------------------------------------------------------ [2007-05-10 14:11:02] cbutler at technophobia dot co dot uk Description: ------------ The error message given by rename() when one of its arguments doesn't exist does not distinguish which argument is at fault. This can make tracking down problems more difficult. Reproduce code: --------------- fclose(fopen("testfile", "w")); echo "bad 1st arg"; rename("nonexistantfile", "test"); echo "bad 2nd arg"; rename("testfile", "non/existant/dir"); Expected result: ---------------- bad 1st arg Warning: rename(nonexistantfile,test): nonexistantfile: No such file or directory in Command line code on line 3 bad 2nd arg Warning: rename(testfile,non/existant/dir): non/existant/dir: No such file or directory in Command line code on line 5 Actual result: -------------- bad 1st arg Warning: rename(nonexistantfile,test): No such file or directory in Command line code on line 3 bad 2nd arg Warning: rename(testfile,non/existant/dir): No such file or directory in Command line code on line 5 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=41354&edit=1
