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

Only return query builder when the result is null for callScope(). #18845

Merged
merged 1 commit into from
Apr 18, 2017
Merged

Only return query builder when the result is null for callScope(). #18845

merged 1 commit into from
Apr 18, 2017

Conversation

adrianb93
Copy link
Contributor

Follow up for PR #18842.

Adrian Brown:

The way the callScope() function is implemented is to return the query builder on null, 0, or false (loose comparison) for the result.

This change will have the callScope() method on the query builder only return $this if the $result is null only.

In my application, I created a query scope that performs the query, evaluates the results and returns a boolean. I was expecting false when a query builder was returned.

Taylor Otwell:

This will need to be sent to 5.5 (master branch) since it's a breaking change.

@taylorotwell taylorotwell merged commit e1d719e into laravel:master Apr 18, 2017
@adrianb93 adrianb93 deleted the patch/strict-comparison-on-scope-return branch April 18, 2017 14:17
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.

None yet

2 participants