diff --git a/src/Configula/Config.php b/src/Configula/Config.php index 64ac688..0d40b9a 100644 --- a/src/Configula/Config.php +++ b/src/Configula/Config.php @@ -48,11 +48,6 @@ public function __construct($configPath = null, $defaults = array()) //Load the config files if ($configPath) { - //Append trailing slash - if (substr($configPath, strlen($configPath) - 1) != DIRECTORY_SEPARATOR) { - $configPath .= DIRECTORY_SEPARATOR; - } - $this->loadConfig($configPath); } } @@ -68,6 +63,11 @@ public function __construct($configPath = null, $defaults = array()) */ public function loadConfig($configPath) { + //Append trailing slash + if (substr($configPath, strlen($configPath) - 1) != DIRECTORY_SEPARATOR) { + $configPath .= DIRECTORY_SEPARATOR; + } + //Array to hold the configuration items as we get them $config = array();