Skip to content

Commit

Permalink
CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
overtrue committed Dec 5, 2015
1 parent 1bce50f commit 4deebad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ public function get($key, $default = null)
public function set($key, $value)
{
if (is_null($key)) {
return $this->config = $value;
throw new InvalidArgumentException("Invalid config key.");
}

$keys = explode('.', $key);

while (count($keys) > 1) {
$key = array_shift($keys);
if (!isset($this->config[$key]) || !is_array($this->config[$key])) {
Expand Down

0 comments on commit 4deebad

Please sign in to comment.