From 155c596a94258041534b0e841aa4fbaebced8c03 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 27 Dec 2023 08:41:37 +0800 Subject: [PATCH] * storyZen: convert the $branch parameter to string. --- module/story/zen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/story/zen.php b/module/story/zen.php index 554b79a708..aaa654e9e7 100644 --- a/module/story/zen.php +++ b/module/story/zen.php @@ -576,7 +576,7 @@ class storyZen extends story $branchTagOption = array(); foreach($branches as $branchInfo) $branchTagOption[$branchInfo->id] = $branchInfo->name . ($branchInfo->status == 'closed' ? ' (' . $this->lang->branch->statusList['closed'] . ')' : ''); - $moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($story->product, 'story', 0, $story->branch); + $moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($story->product, 'story', 0, (string)$story->branch); if($product->type == 'normal' and !empty($story->branch)) $moduleOptionMenu += $this->tree->getModulesName(array($story->module)); $storyBranch = $story->branch > 0 ? $story->branch : '0'; @@ -944,7 +944,7 @@ class storyZen extends story { $productID = $this->view->productID; $branch = $this->view->branch; - $optionMenu = $this->tree->getOptionMenu($productID, 'story', 0, $branch === 'all' ? 0 : $branch); + $optionMenu = $this->tree->getOptionMenu($productID, 'story', 0, $branch); $moduleID = $moduleID ? $moduleID : (int)$this->cookie->lastStoryModule; $moduleID = isset($optionMenu[$moduleID]) ? $moduleID : 0;