Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] DelegatesToResource: fix offsetExists. #20887

Merged
merged 2 commits into from
Sep 1, 2017
Merged

[5.5] DelegatesToResource: fix offsetExists. #20887

merged 2 commits into from
Sep 1, 2017

Conversation

lucasmichot
Copy link
Contributor

DelegatesToResource: fix offsetExists.

@@ -46,7 +46,7 @@ public function resolveRouteBinding($value)
*/
public function offsetExists($offset)
{
return array_key_exists($this->resource[$offset]);
return array_key_exists($this->resource, $offset);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I believe you mean:

return array_key_exists($offset, $this->resource);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed: c907481

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all seriousness - why did the tests not catch that error?

@lucasmichot
Copy link
Contributor Author

lucasmichot commented Aug 31, 2017

#20887 (comment)

yeah @laurencei - some lack happens sometimes 😎 - and we can find some code errors sometimes
I believe a proper code coverage (https://codecov.io ?) should be set-up

@taylorotwell taylorotwell merged commit b87ac8d into laravel:5.5 Sep 1, 2017
Ellrion added a commit to Ellrion/framework that referenced this pull request Sep 1, 2017
@lucasmichot lucasmichot deleted the feature/5.5/fix-delegatesToResource branch September 1, 2017 07:58
This pull request was closed.
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