diff --git a/module/testcase/control.php b/module/testcase/control.php index c5229ab1a5..bc8bef37f3 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -1091,7 +1091,7 @@ class testcase extends control { if($_POST) { - $this->testcase->createFromImport($productID, $branch); + $this->testcase->createFromImport($productID, (int)$branch); die(js::locate(inlink('browse', "productID=$productID"), 'parent')); } diff --git a/module/testcase/model.php b/module/testcase/model.php index 6c29a6c977..b5b552cb7c 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -736,8 +736,9 @@ class testcaseModel extends model $this->loadModel('action'); $this->loadModel('story'); $this->loadModel('file'); - $now = helper::now(); - $data = fixer::input('post')->get(); + $now = helper::now(); + $branch = (int)$branch; + $data = fixer::input('post')->get(); if(!empty($_POST['id'])) {