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
Status: Closed Package: Directory function related
PHP Version: 5.2.5RC1 OS: Linux 2.6.21
Private report: No CVE-ID:
 [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-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 17:01:54 2014 UTC