Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[5.2] Fix #14468 by fixing another issue with PR #14188#14476

Merged
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:fix-second-pagination-issue
Jul 26, 2016
Merged

[5.2] Fix #14468 by fixing another issue with PR #14188#14476
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:fix-second-pagination-issue

Conversation

@themsaid
Copy link
Copy Markdown
Member

@themsaid themsaid commented Jul 25, 2016

As addressed here: #14468

The change merged in PR #14188 causes the results inside the Paginator to be an empty array if no results while it'll be an Eloquent Collection otherwise.

Inside the LengthAwarePaginator the empty array will be converted to an empty Base Collection while it's expected to be an Eloquent Collection instead.

This results a Method Not Found exception when you try to use any of the methods that exist in Eloquent\Collection but doesn't exist in Base Collection in the case of no results found.

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.

2 participants