Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Code style fix

  • Loading branch information...
commit 42a19b8c3b32aa97c8793653306acf9a69cb7912 1 parent 86859ca
@creocoder creocoder authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 framework/db/schema/mssql/CMssqlCommandBuilder.php
View
4 framework/db/schema/mssql/CMssqlCommandBuilder.php
@@ -178,8 +178,8 @@ public function createUpdateCounterCommand($table,$counters,$criteria)
*/
public function applyLimit($sql, $limit, $offset)
{
- $limit = $limit!==null ? intval($limit) : -1;
- $offset = $offset!==null ? intval($offset) : -1;
+ $limit = $limit!==null ? (int)$limit : -1;
+ $offset = $offset!==null ? (int)$offset : -1;
if ($limit > 0 && $offset <= 0) //just limit
$sql = preg_replace('/^([\s(])*SELECT( DISTINCT)?(?!\s*TOP\s*\()/i',"\\1SELECT\\2 TOP $limit", $sql);
elseif($limit > 0 && $offset > 0)
Please sign in to comment.
Something went wrong with that request. Please try again.