Fixed Fatal error: Uncaught TypeError: array_replace_recursive(): Argument #1 ($array) must be of type array, null given in /var/ncc/packages/net.nosial.configlib=1.0.2/src/ConfigLib/Configuration.php:331
This commit is contained in:
parent
4cffe41bf0
commit
5afae885db
3 changed files with 17 additions and 4 deletions
|
@ -328,15 +328,23 @@
|
|||
return;
|
||||
}
|
||||
|
||||
$fs = new Filesystem();
|
||||
|
||||
// If the configuration file is a YAML file, import it instead
|
||||
if(str_ends_with($this->path, '.yaml') || str_ends_with($this->path, '.yml'))
|
||||
{
|
||||
$this->import($this->path);
|
||||
|
||||
if(!$fs->exists($this->path))
|
||||
{
|
||||
throw new RuntimeException(sprintf('Unable to import configuration file "%s" from environment, file does not exist', $path));
|
||||
}
|
||||
|
||||
$yaml = file_get_contents($this->path);
|
||||
$this->configuration = Yaml::parse($yaml);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$fs = new Filesystem();
|
||||
|
||||
if (!$fs->exists($this->path))
|
||||
{
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue