From 17f727572145ba8d557b930eafa200ecf97f74bb Mon Sep 17 00:00:00 2001 From: liugang Date: Thu, 1 Aug 2024 11:18:37 +0800 Subject: [PATCH] * [feedback#6610] fix error of passing parameter with unexpected type. --- module/execution/control.php | 4 ++-- module/execution/zen.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index 4f3995c7cd..69b3844c9a 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -470,7 +470,7 @@ class execution extends control if($this->app->getViewType() == 'xhtml') $recPerPage = 10; $pager = new pager($recTotal, $recPerPage, $pageID); - $stories = $this->story->getExecutionStories($executionID, 0, $sort, $type, (string)$param, $project->storyType, '', $pager); + $stories = $this->story->getExecutionStories($executionID, 0, $sort, $type, (string)$param, $project->storyType ?? 'story', '', $pager); $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); if(!empty($stories)) $stories = $this->story->mergeReviewer($stories); @@ -2300,7 +2300,7 @@ class execution extends control $this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'linkStory', $object); $project = (strpos('sprint,stage,kanban', $object->type) !== false) ? $this->loadModel('project')->getByID($object->project) : $object; - $storyType = (($object->type == 'stage' && in_array($object->attribute, array('mix', 'request', 'design'))) || $object->type == 'project' || !$object->multiple) ? $project->storyType : 'story'; + $storyType = (($object->type == 'stage' && in_array($object->attribute, array('mix', 'request', 'design'))) || $object->type == 'project' || !$object->multiple) ? ($project->storyType ?? 'story') : 'story'; if($browseType == 'bySearch') $allStories = $this->story->getBySearch('all', '', $queryID, $orderBy, $objectID, $storyType); if($browseType != 'bySearch') $allStories = $this->story->getProductStories(implode(',', array_keys($products)), $branchIDList, '0', 'active,launched', $storyType, $orderBy, true, '', null); diff --git a/module/execution/zen.php b/module/execution/zen.php index 163e691108..3e9a12928c 100644 --- a/module/execution/zen.php +++ b/module/execution/zen.php @@ -1874,7 +1874,7 @@ class executionZen extends execution if(isset($project->hasProduct) and empty($project->hasProduct)) { $shadowProduct = $this->loadModel('product')->getShadowProductByProject($project->id); - $this->view->productPlan = $this->loadModel('productplan')->getPairs($shadowProduct->id, '0,0', 'noclosed,unexpired', true); + $this->view->productPlan = $this->loadModel('productplan')->getPairs($shadowProduct->id ?? 0, '0,0', 'noclosed,unexpired', true); } }