Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Illuminate/Http/Resources/DelegatesToResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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?

}

/**
Expand Down