Skip to content

Commit 024981a

Browse files
committed
Add support for keys with dot
1 parent 22f5d02 commit 024981a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ArrayReader.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ public function findChronos(string $key, Chronos $default = null)
283283
*/
284284
public function find(string $path, $default = null)
285285
{
286+
if (array_key_exists($path, $this->data)) {
287+
return $this->data[$path] ?? $default;
288+
}
289+
290+
if (strpos($path, '.') === false) {
291+
return $default;
292+
}
293+
286294
$pathKeys = explode('.', $path);
287295

288296
$arrayCopyOrValue = $this->data;

0 commit comments

Comments
 (0)