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
 [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

Pull Requests

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: Thu Nov 21 08:01:29 2024 UTC