Skip to content

[5.8] Don't execute query when ids are empty Arrayable - #28432

Merged
taylorotwell merged 4 commits into
laravel:5.8from
mnabialek:findmany-avoid-query-when-empty-ids
May 7, 2019
Merged

[5.8] Don't execute query when ids are empty Arrayable#28432
taylorotwell merged 4 commits into
laravel:5.8from
mnabialek:findmany-avoid-query-when-empty-ids

Conversation

@mnabialek

Copy link
Copy Markdown
Contributor

Previous condition was met only if $ids were empty array. If they were empty instance of Arrayable (for example collection with no elements) condition was false and query was executed.

Comment thread src/Illuminate/Database/Eloquent/Builder.php Outdated
Comment thread tests/Database/DatabaseEloquentBuilderTest.php
@driesvints
driesvints dismissed their stale review May 7, 2019 08:15

I was wrong 🙊

@taylorotwell
taylorotwell merged commit 7f78d95 into laravel:5.8 May 7, 2019
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