8000 Merge pull request #645 from cmenke/patch-2 · laravel/framework@daa0739 · GitHub
[go: up one dir, main page]

Skip to content

Commit daa0739

Browse files
committed
Merge pull request #645 from cmenke/patch-2
[Bugfix] Re-enable array_get to fetch "flat" array keys containing dots.
2 parents cdbb682 + 3380576 commit daa0739

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Illuminate/Support/helpers.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ function array_forget(&$array, $key)
169169
function array_get($array, $key, $default = null)
170170
{
171171
if (is_null($key)) return $array;
172+
173+
if (isset($array[$key])) return $array[$key];
172174

173175
foreach (explode('.', $key) as $segment)
174176
{

0 commit comments

Comments
 (0)
0