Merge pull request #105 from ss23/patch-1

Uncasted user input cause SQL issues
This commit is contained in:
Sam Minnée 2013-03-24 16:31:07 -07:00
commit 8fb39f846e
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class FieldEditor extends FormField {
$parentID = $this->form->getRecord()->ID;
if($parentID) {
$parentID = Convert::raw2sql($parentID);
$parentID = (int)$parentID;
$sqlQuery = new SQLQuery();
$sqlQuery = $sqlQuery
@ -222,7 +222,7 @@ class FieldEditor extends FormField {
// work out the sort by getting the sort of the last field in the form +1
if($parent) {
$sql_parent = Convert::raw2sql($parent);
$sql_parent = (int)$parent;
$sqlQuery = new SQLQuery();
$sqlQuery = $sqlQuery