PHP notice

Trying to get property of non-object

/home/vladnews/data/www/radiolemma.ru/htdocs/protected/modules/front/controllers/BroadcastController.php(32)

20         }
21 
22 
23 
24         $this->render('index', array('broadcasts' => $broadcasts));
25 
26     }
27 
28 
29     public function actionView($id)
30     {
31         $broadcast = Broadcast::model()->active()->findByPk($id);
32         $this->metaTitle = $broadcast->name;
33         $this->breadcrumbs[] = $broadcast->name;
34 
35         $this->openGraph['title'] = $broadcast->name;
36         $this->openGraph['url'] = Yii::app()->params['siteUrl'] . Yii::app()->params['broadcastPref'] . $broadcast->id;
37         $this->openGraph['description'] = str_replace('"', "'", $broadcast->teaser);
38         $this->openGraph['article'] = 'article';
39 
40         $otherBroadcasts = Broadcast::model()->active()->findAll(array('condition' => 'id != ' .$id , 'order' => 'RAND()', 'limit' => '2'));
41         $this->render('view', array('broadcast' => $broadcast, 'otherBroadcasts' => $otherBroadcasts));
42     }
43 
44 

Stack Trace

#9
+
 /home/vladnews/data/www/radiolemma.ru/htdocs/index.php(22): CApplication->run()
17 
18 
19 require_once($yii);
20 
21 
22 Yii::createWebApplication($config)->run();
2024-04-19 03:02:08 nginx/1.10.3 Yii Framework/1.1.14