Fix missing directory separators in config file specifications.

This commit is contained in:
Austen McDonald
2016-07-30 10:49:49 +00:00
parent d30915c514
commit a4dd6a4a25
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class Bootstrap
$configFilePath = implode(DIRECTORY_SEPARATOR, [$this->rootDir, "config", "lotgd.yml"]);
}
else {
$configFilePath = $this->rootDir . $configFilePath;
$configFilePath = $this->rootDir . DIRECTORY_SEPARATOR . $configFilePath;
}
if ($configFilePath === false || strlen($configFilePath) == 0 || is_file($configFilePath) === false) {
+1 -1
View File
@@ -31,7 +31,7 @@ abstract class ModelTestCase extends \PHPUnit_Extensions_Database_TestCase
final public function getConnection(): \PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection
{
if ($this->connection === null) {
$configFilePath = getcwd() . getenv('LOTGD_CONFIG');
$configFilePath = getcwd() . DIRECTORY_SEPARATOR . getenv('LOTGD_CONFIG');
if ($configFilePath === false || strlen($configFilePath) == 0 || is_file($configFilePath) === false) {
throw new InvalidConfigurationException("Invalid or missing configuration file: '{$configFilePath}'.");
}