PHP notice

Trying to get property of non-object

/var/www/www.biologi.ipb.ac.id/protected/modules/web/controllers/StudentController.php(50)

38                 $this->pageTitle = Lang::t("Mahasiswa", "Students");
39                 $this->layout='/layouts/onecolumn';
40                 $this->render('index', $viewData);
41 
42         }
43 
44         public function actionProgram($slug, $deg)
45         {
46                 if(!Yii::app()->request->isAjaxRequest)
47                 {
48                     $prog = DegreeProgram::model()->getBySlug($slug);
49                     $allPrograms = DegreeProgram::model()->getAll();
50                     $classYears = Student::model()->getClassYear($prog->id, $deg);
51 
52                     $viewData['allPrograms'] = $allPrograms;
53                     $viewData['program'] = $prog;
54                     $viewData['degree'] = $deg;
55                     $viewData['classYears'] = $classYears;
56 
57                     $this->pageTitle = Lang::t("Mahasiswa " . $prog->name . " (" . $deg . ")" ,
58                                                "Students of " . $prog->name_en . " (" . $deg . ")" );
59                     $this->pageHeaderImage = '/' . $prog->icon_url;
60                     $this->layout='/layouts/onecolumn';
61                     $this->render('list', $viewData);
62                 }

Stack Trace

#9
+
 /var/www/www.biologi.ipb.ac.id/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2024-03-28 23:19:59 Apache Yii Framework/1.1.14