Commit 6e8ee199 authored by Fabio B. Silva's avatar Fabio B. Silva Committed by fabios

Fix CS

parent 72670d26
...@@ -802,7 +802,7 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -802,7 +802,7 @@ class SQLServerPlatform extends AbstractPlatform
*/ */
protected function doModifyLimitQuery($query, $limit, $offset = null) protected function doModifyLimitQuery($query, $limit, $offset = null)
{ {
if ( ! $limit > 0) { if ($limit === null) {
return $query; return $query;
} }
...@@ -826,8 +826,8 @@ class SQLServerPlatform extends AbstractPlatform ...@@ -826,8 +826,8 @@ class SQLServerPlatform extends AbstractPlatform
//Split ORDER BY into parts //Split ORDER BY into parts
foreach ($orderByParts as &$part) { foreach ($orderByParts as &$part) {
$part = trim($part);
if (preg_match('/(([^\s]*)\.)?([^\.\s]*)\s*(ASC|DESC)?/i', $part, $matches)) { if (preg_match('/(([^\s]*)\.)?([^\.\s]*)\s*(ASC|DESC)?/i', trim($part), $matches)) {
$orderbyColumns[] = array( $orderbyColumns[] = array(
'column' => $matches[3], 'column' => $matches[3],
'hasTable' => ( ! empty($matches[2])), 'hasTable' => ( ! empty($matches[2])),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment