|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47085 rename() returns true even if the file in PHAR does not exist
Submitted: 2009-01-13 11:27 UTC Modified: 2009-02-03 18:30 UTC
From: Assigned: cellog (profile)
Status: Closed Package: PHAR related
PHP Version: 5.3.0alpha3 OS: Windows
Private report: No CVE-ID: None
 [2009-01-13 11:27 UTC]
rename() returns true with phar:// stream wrapper even if the oldfile doesn't exist.

Reproduce code:
rename("phar://a.phar/x", "phar://a.phar/y");
var_dump(rename("phar://a.phar/x", "phar://a.phar/y"));

Expected result:
bool(false) and some warning

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-03 17:10 UTC]
didn't realize this one was out there, I'll take a look
 [2009-02-03 18:30 UTC]
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
Thank you for the report, and for helping us make PHP better.

fixed and added a new test (tests/bug47085.phpt).

This one was easy - I simply hadn't implemented the error on failed rename (oops)
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:30 2019 UTC