mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +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();
|
$this->config = array();
|
||||||
$user = null;
|
$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