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
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

Adds is_null check to Eloquent Builder callScope

  • Loading branch information...
alihamze committed May 28, 2017
commit 4a39882e91c66ad01206a1b1b7f2df5481b8c9cd
@@ -924,7 +924,7 @@ protected function callScope(callable $scope, $parameters = [])
// We will keep track of how many wheres are on the query before running the
// scope so that we can properly group the added scope constraints in the
// query as their own isolated nested where statement and avoid issues.
$originalWhereCount = count($query->wheres);
$originalWhereCount = is_null($query->wheres) ? 0 : count($query->wheres);
$result = $scope(...array_values($parameters)) ?: $this;
ProTip! Use n and p to navigate between commits in a pull request.