#42243 [Opn->Csd]: copy() does not ouput an error when the first arg is a dir (works in win32!)

From: Date: Fri, 10 Aug 2007 00:37:04 +0000
Subject: #42243 [Opn->Csd]: copy() does not ouput an error when the first arg is a dir (works in win32!)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115927@lists.php.net to get a copy of this message
ID: 42243 Updated by: iliaa@php.net Reported By: mahesh dot vemula at in dot ibm dot com -Status: Open +Status: Closed Bug Type: Filesystem function related Operating System: RHEL4 PHP Version: 5CVS-2007-08-08 (CVS) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-08-08 09:22:11] mahesh dot vemula at in dot ibm dot com Description: ------------ On Linux, PHP engine doesn't throw any warning message even if the first arg is a dir, whereas on Windows it does. According to PHP doc, copy() function should not work on directories. Reproduce code: --------------- <?php mkdir("temp"); fclose( fopen("temp.txt", "w") ); var_dump( copy("temp", "temp.txt") ); unlink("temp.txt"); rmdir("temp"); ?> Expected result: ---------------- expecting a warning message on Linux Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42243&edit=1

« previous php.bugs (#115927) next »