From 84d9be32935d5d7083cdc4f56f2a6577707f8b62 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 19 Oct 2018 14:48:22 +0200 Subject: [PATCH] Strengthen the SQL creation from OQL --- core/sqlobjectquery.class.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/sqlobjectquery.class.inc.php b/core/sqlobjectquery.class.inc.php index 2bdd85e2e..e25e6c41e 100644 --- a/core/sqlobjectquery.class.inc.php +++ b/core/sqlobjectquery.class.inc.php @@ -339,8 +339,12 @@ class SQLObjectQuery extends SQLQuery $this->PrepareRendering(); $sFrom = self::ClauseFrom($this->__aFrom, $sIndent); $sWhere = self::ClauseWhere($this->m_oConditionExpr, $aArgs); + // Sanity + $iLimitCount = (int)$iLimitCount; if ($iLimitCount > 0) { + // Sanity + $iLimitStart = (int)$iLimitStart; $sLimit = 'LIMIT '.$iLimitStart.', '.$iLimitCount; } else