From a58fc45e20df15b93d107bfc18b13ffedcd75d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=8D=8E=E4=BC=9F?= Date: Sat, 2 Apr 2022 08:47:38 +0800 Subject: [PATCH] Optimize the code. --- module/bug/control.php | 2 +- module/testcase/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index ca8acaa95a..78c7df3d0e 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -545,7 +545,7 @@ class bug extends control } foreach($stories as $key => $value) { - $story = $this->story->getByID($stories[$key]); + $story = $this->story->getByID($value); if(!empty($story->childStories)) unset($stories[$key]); } diff --git a/module/testcase/control.php b/module/testcase/control.php index ae325ab49a..35abce007d 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -896,7 +896,7 @@ class testcase extends control $stories = $this->story->getProductStoryPairs($productID, $case->branch); foreach($stories as $key => $value) { - $story = $this->story->getByID($stories[$key]); + $story = $this->story->getByID($value); if(!empty($story->childStories)) unset($stories[$key]); } $this->view->productID = $productID;