Skip to content

[7.x] Fix getQueueableRelations() for filtered collections#32747

Merged
taylorotwell merged 1 commit into
laravel:7.xfrom
decnorton:patch-2
May 11, 2020
Merged

[7.x] Fix getQueueableRelations() for filtered collections#32747
taylorotwell merged 1 commit into
laravel:7.xfrom
decnorton:patch-2

Conversation

@decnorton
Copy link
Copy Markdown
Contributor

If the Eloquent Collection has been filtered and the keys retained, $relations[0] will result in an undefined index error. Using reset() will get the first item regardless of its key in the array.

Introduced in 7b32469

If the Eloquent Collection has been filtered and the keys retained, `$relations[0]` will result in an undefined index error. Using `reset()` will get the first item regardless of its key in the array.
@driesvints
Copy link
Copy Markdown
Member

Related: laravel/scout#404

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.

3 participants