diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index 03e9f9091..2e9c78fd7 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -411,7 +411,7 @@ class Sqlserver extends DboSource { $rt = ' TOP'; } $rt .= sprintf(' %u', $limit); - if (is_int($offset) && $offset > 0) { + if ((is_int($offset) || ctype_digit($offset)) && $offset > 0) { $rt = sprintf(' OFFSET %u ROWS FETCH FIRST %u ROWS ONLY', $offset, $limit); } return $rt;