From 85ef3a984923a7f42912cef32e427763ed50d6df Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 1 Dec 2021 10:49:44 +0800 Subject: [PATCH] * Fix option menu in doc and caselib. --- module/tree/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 7041011faf..016f0eeba5 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -136,7 +136,7 @@ class treeModel extends model if($type == 'line') $rootID = 0; - $branches = array(); + $branches = array($branch => ''); if(strpos('story|bug|case', $type) !== false) { $product = $this->loadModel('product')->getById($rootID); @@ -160,7 +160,7 @@ class treeModel extends model foreach($modules as $module) { - $branchName = ($product->type != 'normal' and $module->branch == BRANCH_MAIN) ? $this->lang->branch->main : $branch; + $branchName = (isset($product) and $product->type != 'normal' and $module->branch === BRANCH_MAIN) ? $this->lang->branch->main : $branch; $this->buildTreeArray($treeMenu, $modules, $module, (empty($branchName)) ? '/' : "/$branchName/"); } }