diff --git a/src/think/Config.php b/src/think/Config.php index b229c1f1d7..e612bf92a0 100644 --- a/src/think/Config.php +++ b/src/think/Config.php @@ -115,8 +115,6 @@ public function has(string $name): bool */ protected function pull(string $name): array { - $name = strtolower($name); - return $this->config[$name] ?? []; } @@ -146,7 +144,12 @@ public function get(?string $name = null, $default = null) } if (!str_contains($name, '.')) { - return $this->pull($name); + $name = strtolower($name); + $result = $this->pull($name); + if ($this->hook) { + return $this->lazy($name, $result, []); + } + return $result; } $item = explode('.', $name);