File tree 2 files changed +7
-7
lines changed
laravel/database/query/grammars
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ protected function orderings(Query $query)
355
355
*/
356
356
protected function limit (Query $ query )
357
357
{
358
- return 'LIMIT ' .$ query ->limit ;
358
+ return 'LIMIT ' . ( int ) $ query ->limit ;
359
359
}
360
360
361
361
/**
@@ -366,7 +366,7 @@ protected function limit(Query $query)
366
366
*/
367
367
protected function offset (Query $ query )
368
368
{
369
- return 'OFFSET ' .$ query ->offset ;
369
+ return 'OFFSET ' . ( int ) $ query ->offset ;
370
370
}
371
371
372
372
/**
@@ -488,4 +488,4 @@ public function shortcut($sql, &$bindings)
488
488
return trim ($ sql );
489
489
}
490
490
491
- }
491
+ }
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ protected function selects(Query $query)
59
59
// it to the query here if there is not an OFFSET present.
60
60
if ($ query ->limit > 0 and $ query ->offset <= 0 )
61
61
{
62
- $ select .= 'TOP ' .$ query ->limit .' ' ;
62
+ $ select .= 'TOP ' . ( int ) $ query ->limit .' ' ;
63
63
}
64
64
65
65
return $ select .$ this ->columnize ($ query ->selects );
@@ -91,14 +91,14 @@ protected function ansi_offset(Query $query, $components)
91
91
92
92
unset($ components ['orderings ' ]);
93
93
94
- $ start = $ query ->offset + 1 ;
94
+ $ start = ( int ) $ query ->offset + 1 ;
95
95
96
96
// Next we need to calculate the constraint that should be placed on
97
97
// the row number to get the correct offset and limit on the query.
98
98
// If there is not a limit, we'll just handle the offset.
99
99
if ($ query ->limit > 0 )
100
100
{
101
- $ finish = $ query ->offset + $ query ->limit ;
101
+ $ finish = ( int ) $ query ->offset + ( int ) $ query ->limit ;
102
102
103
103
$ constraint = "BETWEEN {$ start } AND {$ finish }" ;
104
104
}
@@ -137,4 +137,4 @@ protected function offset(Query $query)
137
137
return '' ;
138
138
}
139
139
140
- }
140
+ }
You can’t perform that action at this time.
0 commit comments