From f6ec44cd0658030ca120f443babb1df9eb3995d4 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 21 Mar 2023 10:20:06 +0800 Subject: [PATCH] * Fix bug #33128. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index 0dc3182546..f1f15dce69 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4616,7 +4616,7 @@ class storyModel extends model if($canCreateCase and ($canClose or $canUnlinkStory)) $menu .= "
"; $menu .= $this->buildMenu('story', 'close', $params . "&from=&storyType=$story->type", $story, $type, '', '', 'iframe', true); - if($execution->hasProduct) $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody'); + if(!empty($execution) and $execution->hasProduct) $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody'); } if($this->app->tab == 'product' and $storyType == 'story')