#22234 [NEW]: copy() fails if source file has 0 length
| From: | greg at chiaraquartet dot ent | Date: | Sat, 15 Feb 2003 19:28:02 +0000 |
| Subject: | #22234 [NEW]: copy() fails if source file has 0 length | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-33248@lists.php.net to get a copy of this message | ||
From: greg@chiaraquartet.ent
Operating system: win98
PHP version: 4.3.0
PHP Bug Type: Filesystem function related
Bug description: copy() fails if source file has 0 length
if copy('file','dest') is called, and the 'file' is a 0-length file,
it
will fail. This causes pear install PhpDocumentor to fail on windows.
To test, create an empty file "emptyfile.php" and a non-empty file
"nonemptyfile.php" in the same directory as this script, and run it:
<?php
var_dump(copy('emptyfile.php','newfile.php')); // bool(false)
var_dump(copy('nonemptyfile.php','newfile.php')); //bool(true)
?>
--
Edit bug report at http://bugs.php.net/?id=22234&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22234&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22234&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22234&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22234&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22234&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22234&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22234&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22234&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22234&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22234&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22234&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22234&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22234&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22234&r=gnused