mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 01:02:24 +01:00
Fix possible bug: allow only arrays
This commit is contained in:
parent
76743d22b9
commit
a7c37fcd10
@ -31,7 +31,7 @@ class BootstrapByConfigFile
|
||||
public $configFile = null;
|
||||
|
||||
/**
|
||||
* @var array|string|\stdClass|null $configFileContent
|
||||
* @var array $configFileContent
|
||||
*/
|
||||
public $configFileContent = null;
|
||||
|
||||
@ -109,9 +109,9 @@ class BootstrapByConfigFile
|
||||
*/
|
||||
public function parseConfig()
|
||||
{
|
||||
try {
|
||||
$this->configFileContent = Yaml::parse(file_get_contents($this->configFile));
|
||||
} catch (\RuntimeException $e) {
|
||||
|
||||
if (!is_array($this->configFileContent)) {
|
||||
throw new \RuntimeException("Error in parsing " . $this->configFile . " file.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user