From aae2f9006932f39d65480a4c813451914c3527ce Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 20 May 2016 09:07:48 +0800 Subject: [PATCH] * convert branch to int when import case. --- module/testcase/control.php | 2 +- module/testcase/model.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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'])) {