Skip to content

Commit

Permalink
Fix env set list array error
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records authored and liu21st committed Jun 26, 2024
1 parent b7b6a62 commit 4d5f7ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/think/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ public function set($env, $value = null): void
foreach ($env as $key => $val) {
if (is_array($val)) {
foreach ($val as $k => $v) {
$this->data[$key . '_' . strtoupper($k)] = $v;
if (is_string($k)) {
$this->data[$key . '_' . strtoupper($k)] = $v;
} else {
$this->data[$key][$k] = $v;
}
}
} else {
$this->data[$key] = $val;
Expand Down

0 comments on commit 4d5f7ef

Please sign in to comment.