Skip to content

Commit

Permalink
support $cnf->get('a')->get('b.c')
Browse files Browse the repository at this point in the history
  • Loading branch information
shaukei authored May 30, 2022
1 parent 1e7ce49 commit bb84161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function getDefaults()
public function get($key, $default = null)
{
if ($this->has($key)) {
return $this->cache[$key];
return is_array($this->cache[$key]) ? Config::load(json_encode($this->cache[$key]), new Parser\Json, true) : $this->cache[$key];
}

return $default;
Expand Down

0 comments on commit bb84161

Please sign in to comment.