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

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

Merged
merged 1 commit into from
May 29, 2017
Merged

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

merged 1 commit into from
May 29, 2017

Conversation

alihamze
Copy link
Contributor

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 Adds is_null check to Eloquent Builder callScope [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
@brickgale
Copy link

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.

@omeha2
Copy link

omeha2 commented Jan 5, 2018

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

@peyobr
Copy link

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.

@omeha2
Copy link

omeha2 commented Jan 26, 2018

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

@devcircus
Copy link
Contributor

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
Copy link

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
Copy link
Contributor Author

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

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.

7 participants