php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43137 rmdir() and rename() do not clear statcache
Submitted: 2007-10-30 10:04 UTC Modified: 2007-10-31 13:23 UTC
From: kore@php.net Assigned: jani (profile)
Status: Closed Package: Directory function related
PHP Version: 5.2.5RC1 OS: Linux 2.6.21
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kore@php.net
New email:
PHP Version: OS:

 

 [2007-10-30 10:04 UTC] kore@php.net
Description:
------------
rmdir() does not clear the statcache like unlink() does.

Reproduce code:
---------------
#!/usr/bin/env php
<?php

mkdir( $dirname = md5( microtime() ) );
var_dump( is_dir( $dirname ) );
rmdir( $dirname );
var_dump( is_dir( $dirname ) );
clearstatcache();
var_dump( is_dir( $dirname ) );

?>

Expected result:
----------------
bool(true)
bool(false)
bool(false)


Actual result:
--------------
bool(true)
bool(true)
bool(false)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-31 13:23 UTC] jani@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC