mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/10941] Modified tearDown to use DirectoryIterator instead of glob
PHPBB3-10941
This commit is contained in:
@@ -83,9 +83,14 @@ class phpbb_filespec_test extends phpbb_test_case
|
||||
$this->config = array();
|
||||
$user = null;
|
||||
|
||||
foreach (glob($this->path . 'copies/*') as $file)
|
||||
$iterator = new DirectoryIterator($this->path . 'copies');
|
||||
foreach ($iterator as $fileinfo)
|
||||
{
|
||||
unlink($file);
|
||||
$name = $fileinfo->getFilename();
|
||||
if ($name[0] !== '.')
|
||||
{
|
||||
unlink($fileinfo->getPathname());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user