Skip to content

Commit 0eba46e

Browse files
authored
Update Json.php
1 parent d180a94 commit 0eba46e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Json.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function decode(?string $content = null)
3737
return $this;
3838
}
3939

40-
public function get(?string $key = null, $default = null)
40+
public function get(mixed $key = null, $default = null)
4141
{
42-
if (!$key) {
42+
if (!array_key_exists($key, $this->data)) {
4343
return $this->data;
4444
}
4545

0 commit comments

Comments
 (0)