Skip to content

Commit

Permalink
Allow to extend grammar without issues; (#25944)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Bocheński authored and taylorotwell committed Oct 5, 2018
1 parent 0619b27 commit 65904d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function compileComponents(Builder $query)
// To compile the query, we'll spin through each component of the query and
// see if that component exists. If it does we'll just call the compiler
// function for the component which is responsible for making the SQL.
if (! is_null($query->$component)) {
if (isset($query->$component) && ! is_null($query->$component)) {
$method = 'compile'.ucfirst($component);

$sql[$component] = $this->$method($query, $query->$component);
Expand Down

0 comments on commit 65904d5

Please sign in to comment.