PHP notice

Trying to get property of non-object

/home/wwwroot/complete/production/protected/controllers/AuctionController.php(184)

172     
173     /**
174      * 拍品详细页面
175      */
176     public function actionGoods(){
177         Yii::app()->theme = 'v2';
178         //echo"123";exit;
179         $objective_id = Yii::app()->request->getParam('goods_id');
180         $objective = AuctionObjective::model()->findByPk( $objective_id );
181  
182         $auction = Auction::model()->findByPk($objective->auction_id);
183         
184         $auction_cat = AuctionCat::model()->findByPk($auction->cat_id);
185         
186         $objective_same = new AuctionObjective();
187                 $command = Yii::app()->db->createCommand();
188                 $returnObjective = $command->select('objective_name,image,opening_bid,objective_id')
189                 ->from($objective_same->tableName()) 
190                 ->where('AUCTION_ID=:AUCTION_ID', array(':AUCTION_ID'=>$objective->auction_id)) 
191                 ->limit(5) 
192                 ->queryALL();
193 
194         if( $objective == null ){
195             throw new CHttpException(404, Yii::t('common', 'The requested page does not exist.'));
196         }

Stack Trace

#7
+
 /home/wwwroot/complete/start.php(10): CApplication->run()
05 ini_set('session.name','AUTHENTICATION');
06 //ini_set('session.use_cookies',0);
07 
08 require( dirname(__FILE__).'/common/framework.php' );
09 
10 Yii::createWebApplication( HBasic::$setting )->run();
#8
+
 /home/wwwroot/complete/production/index.php(75): include("/home/wwwroot/complete/start.php")
70     echo("<meta http-equiv=refresh content=0;url=http://mobile.lantaiyipai.com/>");
71 }else{
72     defined('H_APP_DIR') or define('H_APP_DIR',dirname(__FILE__));
73 
74 //load parent folder index to starting ...
75 include( H_APP_DIR.'/../start.php' );
76 }
77 
78 
79 
80 
2024-03-29 08:16:26 Apache/2.2.22 (Debian) Yii Framework/1.1.13