bug fix in Config::readDir

This commit is contained in:
Joby Elliott 2020-06-21 16:52:04 +00:00
parent bc642be178
commit 14891585b0

View file

@ -9,7 +9,7 @@ class Config extends SelfReferencingFlatArray implements ConfigInterface
{ {
public $strict = false; public $strict = false;
public function readDir($dir, string $name = null, bool $overwrite = null) public function readDir($dir, string $name = null, bool $overwrite = false)
{ {
$dir = realpath($dir); $dir = realpath($dir);
if (!$dir || !is_dir($dir)) { if (!$dir || !is_dir($dir)) {
@ -17,11 +17,7 @@ class Config extends SelfReferencingFlatArray implements ConfigInterface
} }
foreach (glob("$dir/*") as $f) { foreach (glob("$dir/*") as $f) {
if (is_file($f)) { if (is_file($f)) {
try { $this->readFile($f, $name, $overwrite);
$this->readFile($f, $name, $overwrite);
} catch (\Throwable $th) {
//ignore exceptions
}
} }
} }
} }