remove unused IgnorantRecursiveDirectoryIterator and fix uninitialized variables

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-04-20 15:11:48 +02:00
parent 58c646f59e
commit b362c1f232
5 changed files with 6 additions and 25 deletions

View File

@@ -1,21 +0,0 @@
<?php
namespace Froxlor\System;
/**
* If you use RecursiveDirectoryIterator with RecursiveIteratorIterator and run
* into UnexpectedValueException you may use this little hack to ignore those
* directories, such as lost+found on linux.
* (User "antennen" @ http://php.net/manual/en/class.recursivedirectoryiterator.php#101654)
*/
class IgnorantRecursiveDirectoryIterator extends \RecursiveDirectoryIterator
{
public function getChildren()
{
try {
return new IgnorantRecursiveDirectoryIterator($this->getPathname());
} catch (\UnexpectedValueException $e) {
return new \RecursiveArrayIterator(array());
}
}
}