From d92586022de701d4a7ec4c4753ec29be41ebd42d Mon Sep 17 00:00:00 2001 From: sunguangming Date: Thu, 29 Aug 2024 08:30:53 +0000 Subject: [PATCH] * [bug#54724,done,0.2h] fix bug. --- module/tree/control.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/tree/control.php b/module/tree/control.php index d6c428dbde..c8f77c58c3 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -159,6 +159,8 @@ class tree extends control */ public function edit(int $moduleID, string $type, string $branch = '0') { + $this->app->loadLang('task'); + if(!empty($_POST)) { $this->tree->update($moduleID, $type); @@ -215,7 +217,7 @@ class tree extends control if($showProduct) { $product = $this->loadModel('product')->getById($module->root); - if($product->type != 'normal') $this->view->branches = $this->loadModel('branch')->getPairs($module->root, 'withClosed'); + $this->view->branches = $product->type != 'normal' ? $this->loadModel('branch')->getPairs($module->root, 'withClosed') : array(); $this->view->product = $product; $this->view->products = $this->product->getPairs('', $product->program); if($product->shadow) $showProduct = false;