From 178c3f2dee769c66bd91d1b10ded5ae93bbc0fb7 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 4 Jul 2013 06:44:33 +0000 Subject: [PATCH] * fix a bug for no project and product. --- module/product/model.php | 2 ++ module/project/model.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/module/product/model.php b/module/product/model.php index 2a8315c6da..3e0b7d983f 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -59,6 +59,8 @@ class productModel extends model */ public function select($products, $productID, $currentModule, $currentMethod, $extra = '') { + if(!$productID) return; + $currentProduct = $this->getById($productID); $output = "
"; $output .= "{$currentProduct->name}"; diff --git a/module/project/model.php b/module/project/model.php index a5207eb4af..be1c9b5fc6 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -116,6 +116,8 @@ class projectModel extends model */ public function select($projects, $projectID, $currentModule, $currentMethod, $extra = '') { + if(!$projectID) return; + $currentProject = $this->getById($projectID); $output = "
"; $output .= "{$currentProject->name}";