Skip to content

Commit

Permalink
Uncasted user input cause SQL issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ss23 committed Mar 24, 2013
1 parent 6f1f3a2 commit 5c9a962
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/formfields/FieldEditor.php
Expand Up @@ -180,7 +180,7 @@ public function addfield() {
$parentID = $this->form->getRecord()->ID;

if($parentID) {
$parentID = Convert::raw2sql($parentID);
$parentID = (int)$parentID;

$sqlQuery = new SQLQuery();
$sqlQuery = $sqlQuery
Expand Down Expand Up @@ -222,7 +222,7 @@ public function addoptionfield() {

// 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
Expand Down

0 comments on commit 5c9a962

Please sign in to comment.