PHP notice

Trying to get property of non-object

/var/www/html/vinaphim/protected/controllers/VideoController.php(315)

303             return $this->redirect(array("video/browse"));
304 
305         $vod = VodAsset::model()->findByAttributes(array('id' => $id, 'status' => 1));
306 
307         if(isset($_GET['register_success']) && $_GET['register_success'] == 1){
308             Yii::app()->user->setFlash('responseToUser', "Thông báo: 'Quý khách đã mua thành công bộ phim ".$vod->display_name." với giá ".$vod->price."đ. Thời gian sử dụng 24 giờ.");
309         }
310 
311         $vs = (isset($vod) && $this->subscriber != NULL) ? $this->subscriber->hasVodAsset($vod, USING_TYPE_WATCH) : FALSE;
312         $vsRecvGift = (isset($vod) && $this->subscriber != NULL) ? $this->subscriber->hasVodAsset($vod, USING_TYPE_RECEIVE_GIFT) : FALSE;
313 
314         $svc = NULL;
315         if ($vod->is_free != 1 && $viewTrailer == false) {
316             if (count($this->usingServices) > 0) {
317                 $svc = $this->usingServices[0];
318                 //error_log("isExpired=" . $svc->isExpired() . ",vs=" .);
319                 if ($svc->isExpired() && $vs === FALSE && $vsRecvGift === FALSE)
320                     return $this->redirect(array("video/browse"));
321             } else if ($vod->price > 0 && $vs === FALSE && $vsRecvGift === FALSE) {
322                 return $this->redirect(array("video/browse"));
323             }
324         }
325 
326         $streams = array();
327         $episode = isset($_REQUEST['episode']) ? $_REQUEST['episode'] : 0;

Stack Trace

#10
+
 /var/www/html/vinaphim/index.php(15): CApplication->run()
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($project_const);
13 require_once($yii);
14 
15 Yii::createWebApplication($config)->run();
2024-03-29 07:37:35 Apache Yii Framework/1.1.13