diff --git a/module/action/model.php b/module/action/model.php index 701f70d153..75e4b8cf66 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -197,7 +197,6 @@ class actionModel extends model $this->loadModel('workflow'); foreach($actions as $actionID => $action) { - $extra = $action->extra; $actionName = strtolower($action->action); if($this->config->edition != 'open' && !isset($flowList[$action->objectType])) $flowList[$action->objectType] = $this->workflow->getByModule($action->objectType); @@ -1172,7 +1171,7 @@ class actionModel extends model /* If idList include ',*,' Format ',*,' to '*'. */ $projectIdList = array(); - foreach($projectGroups as $key => $idList) + foreach($projectGroups as $idList) { $idList = explode(',', (string)$idList); foreach($idList as $id) $projectIdList[] = $id; diff --git a/module/bug/model.php b/module/bug/model.php index cd61b8cefd..c0d51afa2d 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -41,7 +41,7 @@ class bugModel extends model if(!empty($bug->assignedTo)) $this->action->create('bug', $bugID, 'Assigned', '', $bug->assignedTo); /* Add score for create. */ - $files = $this->loadModel('file')->saveUpload('bug', $bugID); + $this->loadModel('file')->saveUpload('bug', $bugID); if(!empty($bug->case)) { $this->loadModel('score')->create('bug', 'createFormCase', $bug->case); diff --git a/module/bug/zen.php b/module/bug/zen.php index c955b48d72..e8b3eca51c 100644 --- a/module/bug/zen.php +++ b/module/bug/zen.php @@ -1163,7 +1163,7 @@ class bugZen extends bug if($product->type != 'normal') $branchTagOption = $this->getBranchOptions($product->id); if($this->config->edition == 'max') $this->view->injectionList = $this->view->identifyList = $this->loadModel('review')->getPairs($bug->project, $bug->product, true); - $this->assignVarsForEdit($bug); + $this->assignVarsForEdit($bug, $product); $this->view->title = $this->lang->bug->edit . "BUG #$bug->id $bug->title - " . $this->products[$bug->product]; $this->view->bug = $bug; @@ -1181,10 +1181,11 @@ class bugZen extends bug * Assign variables for editing bug. * * @param object $bug + * @param object $product * @access protected * @return void */ - protected function assignVarsForEdit(object $bug): void + protected function assignVarsForEdit(object $bug, object $product): void { /* Add product related to the bug when it is not in the products. */ if(!isset($this->products[$bug->product])) diff --git a/module/caselib/zen.php b/module/caselib/zen.php index 277c9951f2..28a7156c4c 100644 --- a/module/caselib/zen.php +++ b/module/caselib/zen.php @@ -245,8 +245,8 @@ class caselibZen extends caselib if(empty($rows)) { - $row->typeValue = join("\n", $this->lang->testcase->typeList); - $row->stageValue = join("\n", $this->lang->testcase->stageList); + $row->typeValue = implode("\n", $this->lang->testcase->typeList); + $row->stageValue = implode("\n", $this->lang->testcase->stageList); } $rows[] = $row; @@ -444,7 +444,7 @@ class caselibZen extends caselib $case->stage = array(); foreach($stages as $stage) $case->stage[] = array_search($stage, $this->lang->testcase->stageList); - $case->stage = join(',', $case->stage); + $case->stage = implode(',', $case->stage); } else { @@ -558,7 +558,6 @@ class caselibZen extends caselib { $users = $this->loadModel('user')->getPairs('noletter'); $relatedModules = $this->loadModel('tree')->getModulePairs($libID, 'caselib'); - $relatedCases = $this->loadModel('testcase')->getRelatedCases($cases); $relatedSteps = $this->testcase->getRelatedSteps(array_keys($cases)); $relatedFiles = $this->testcase->getRelatedFiles(array_keys($cases)); @@ -655,7 +654,7 @@ class caselibZen extends caselib { $case->stage = explode(',', $case->stage); foreach($case->stage as $key => $stage) $case->stage[$key] = isset($this->lang->testcase->stageList[$stage]) ? $this->lang->testcase->stageList[$stage] : $stage; - $case->stage = join("\n", $case->stage); + $case->stage = implode("\n", $case->stage); } /** @@ -697,6 +696,6 @@ class caselibZen extends caselib $linkCaseID = trim($linkCaseID); $tmpLinkCases[] = isset($relatedCases[$linkCaseID]) ? $relatedCases[$linkCaseID] . "(#$linkCaseID)" : $linkCaseID; } - $case->linkCase = join("; \n", $tmpLinkCases); + $case->linkCase = implode("; \n", $tmpLinkCases); } } diff --git a/module/custom/control.php b/module/custom/control.php index 1d4cc17991..b9ee63b120 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -595,7 +595,7 @@ class custom extends control $menus = json_decode($items); $menuNames = array(); - foreach($menus as $key => $item) $menuNames[] = $item->name; + foreach($menus as $item) $menuNames[] = $item->name; foreach($oldMenus as $key => $item) { diff --git a/module/execution/control.php b/module/execution/control.php index 3c7d0dca59..566acc0a44 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3495,7 +3495,7 @@ class execution extends control $this->loadModel('task'); $result = array(); - foreach($array as $key => $object) + foreach($array as $object) { $result[$object->id] = $object; $tasks = zget($object, 'tasks', array());