|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-22 13:30 UTC] johannes@php.net
-Status: Open
+Status: Bogus
-Package: Feature/Change Request
+Package: *General Issues
[2010-12-22 13:30 UTC] johannes@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun May 24 09:00:01 2026 UTC |
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