Skip to content

[5.3] Fix in Arr::has to check for exact key first#14976

Merged
taylorotwell merged 1 commit into
laravel:5.3from
themsaid:arr-has-fix
Aug 23, 2016
Merged

[5.3] Fix in Arr::has to check for exact key first#14976
taylorotwell merged 1 commit into
laravel:5.3from
themsaid:arr-has-fix

Conversation

@themsaid
Copy link
Copy Markdown
Member

The change was presented here:
#14789

Before the above change using Arr::has(['first.name' => 'Jon'], 'first.name') would return true as the method was checking for the exact key first before assuming it's a dot notation.

The PR purpose doesn't indicate removing this behaviour, so I assume this needs a fix.

@themsaid themsaid closed this Aug 23, 2016
@themsaid themsaid reopened this Aug 23, 2016
@GrahamCampbell
Copy link
Copy Markdown
Collaborator

👍 @taylorotwell - probably merge this before tagging 5.3.1. :)

@taylorotwell taylorotwell merged commit 39a39b5 into laravel:5.3 Aug 23, 2016
@vlakoff
Copy link
Copy Markdown
Contributor

vlakoff commented Aug 24, 2016

Well spotted. I'm surprised we didn't have a test for this case. Maybe it should be added for Arr::get() as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants