diff --git a/code/MultiForm.php b/code/MultiForm.php index 2a3c4b9..2ba1e0a 100644 --- a/code/MultiForm.php +++ b/code/MultiForm.php @@ -257,8 +257,9 @@ abstract class MultiForm extends Form { * @param int|string $id The ID of the record to retrieve * @return MultiFormSession */ - function getSessionRecordByID($id) { - return DataObject::get_one('MultiFormSession', "MultiFormSession.ID = $id AND IsComplete = 0"); + function getSessionRecordByID($id) { + $SQL_id = (int)$id; + return DataObject::get_one('MultiFormSession', "MultiFormSession.ID = {$SQL_id} AND IsComplete = 0"); } /**