From b04e4d22365bb5caad16cd168ee8a5c4f1ed8479 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Fri, 15 Apr 2022 07:36:19 +0000 Subject: [PATCH] * Fix bug #21801. --- module/testcase/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 3aec963670..3809d8dbec 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -216,7 +216,7 @@ class testcase extends control $this->view->browseType = $browseType; $this->view->param = $param; $this->view->cases = $cases; - $this->view->branch = $product->type == 'normal' ? 0 : $branch; + $this->view->branch = !empty($product) and $product->type != 'normal' ? $branch : 0; $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; $this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);