PHP notice

Trying to get property of non-object

/state/partition1/workspace/htdocs/173/genedenovo/protected/controllers/ProductController.php(66)

54      * Author: angel.
55      * Version: 1.0.0
56      * Checkor:
57      */
58     public function actionView()
59     {
60         $id = Common::getGet('id');
61         $product_cat = $project = $product_cat_yi = array();
62         //根据id获取分类id
63         $project = Project::model()->findByPk($id);
64         
65         //二级分类
66         $product_cat = Project::model()->findByPk($project->pid);
67         
68         //如果有三级分类则获取以及分类
69         if($product_cat)
70         {
71             $product_cat_yi = Project::model()->findByPk($product_cat->pid);
72         }
73         
74         //页面SEO优化设置
75         $this->seoTitle = $project->name.'-产品&服务-广州基迪奥生物科技有限公司';
76         $this->seoKeywords = '测序,基迪奥生物,高通量测序,基迪奥,生物信息分析';
77         $this->seoDescription = '基迪奥生物是一家专注于现代高新生物技术服务的高科技企业,公司致力于为广大客户提供高通量测序及个性生物信息学分析等科研服务。';
78         

Stack Trace

#7
+
 /state/partition1/workspace/htdocs/173/genedenovo/index.php(12): CApplication->run()
07 // remove the following line when in production mode
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 
10 require_once($yii);
11 //require_once(dirname(__FILE__).'/library/Common.php');
12 Yii::createWebApplication($config)->run();
2020-09-13 19:48:25 Apache Yii Framework/1.1.13