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

[5.4] Adds is_null check to Eloquent Builder callScope #19381

Merged
merged 1 commit into from May 29, 2017

Conversation

Projects
None yet
7 participants
@alihamze
Contributor

alihamze commented May 28, 2017

This fixes #19380 by adding an is_null check before calling count() and defaulting to 0 if it is null.

@alihamze alihamze changed the title from Adds is_null check to Eloquent Builder callScope to [5.4] Adds is_null check to Eloquent Builder callScope May 28, 2017

@taylorotwell taylorotwell merged commit 4a39882 into laravel:5.4 May 29, 2017

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@brickgale

This comment has been minimized.

brickgale commented Dec 13, 2017

is this fix possible to be port over lower versions of laravel? *currently encountering this error on version 5.2.* in latest homestead environment. confirmed it fix, changed it manually on vendor file.

@Ramonlord

This comment has been minimized.

Ramonlord commented Jan 5, 2018

Maybe better just change
public $wheres;
to
public $wheres = [];
in \Database\Query\Builder?

@peyobr

This comment has been minimized.

peyobr commented Jan 26, 2018

It would be fixed in L5.2.* as well?

Yesterday upgraded to PHP7.2 and now production service is broken.

Please let me know. Thank you.

@Ramonlord

This comment has been minimized.

Ramonlord commented Jan 26, 2018

Yes thats only one problem which i had after upgrading to 7.2

@devcircus

This comment has been minimized.

Contributor

devcircus commented Jan 26, 2018

How far back to go? I wouldn't expect unsupported versions of a framework to continue working on each iteration of PHP. However, if it's a simple fix, maybe a PR would be accepted.

atzeteppema added a commit to atzeteppema/database that referenced this pull request Feb 16, 2018

@aleemb

This comment has been minimized.

aleemb commented May 8, 2018

@taylorotwell Can we commit this to 5.2 and 5.3 branches also? It will open those up to PHP 7.2 as well.

aleemb added a commit to aleemb/framework that referenced this pull request May 8, 2018

@alihamze

This comment has been minimized.

Contributor

alihamze commented May 8, 2018

@aleemb They already said 5.2 is closed #22927 so doubt it'll get ported back. 5.3 should already be fixed #22567

taylorotwell added a commit that referenced this pull request May 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment