summaryrefslogtreecommitdiff
path: root/framework/Data/Common
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Data/Common')
-rw-r--r--framework/Data/Common/TDbCommandBuilder.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Data/Common/TDbCommandBuilder.php b/framework/Data/Common/TDbCommandBuilder.php
index c4bfeb98..155a62f8 100644
--- a/framework/Data/Common/TDbCommandBuilder.php
+++ b/framework/Data/Common/TDbCommandBuilder.php
@@ -90,8 +90,8 @@ class TDbCommandBuilder extends TComponent
*/
public function applyLimitOffset($sql, $limit=-1, $offset=-1)
{
- $limit = $limit!==null ? intval($limit) : -1;
- $offset = $offset!==null ? intval($offset) : -1;
+ $limit = $limit!==null ? (int)$limit : -1;
+ $offset = $offset!==null ? (int)$offset : -1;
$limitStr = $limit >= 0 ? ' LIMIT '.$limit : '';
$offsetStr = $offset >= 0 ? ' OFFSET '.$offset : '';
return $sql.$limitStr.$offsetStr;