PHP notice

Undefined offset: 0

/home1/grampiansexualhe/public_html/protected/views/templates/video.php(2)

01 <?
02     $parent = $model->parent[0];
03     
04     foreach($model->parent as $item){
05         if($item->title == 'Video Library')
06             $parent = $item;
07     }
08     
09 ?>
10     <div class="intro">
11         <h1><?=$model->title?></h1>
12         <?=$model->copy?>
13     </div>
14     

Stack Trace

#3
+
 /home1/grampiansexualhe/public_html/protected/views/articles/view.php(2): CController->renderPartial("//templates/video", array("model" => Articles, "subnav" => array("article" => Articles, "children" => array()), "upload" => array("form" => Submissions, "submissions" => array(Submissions, Submissions, Submissions, Submissions, ...), "message" => false)))
1 
2 <?$this->renderPartial('//templates/'.$model->type->template,array('model'=>$model,'subnav'=>$subnav,'upload'=>$upload));?>
#8
+
 /home1/grampiansexualhe/public_html/protected/controllers/ArticlesController.php(92): CController->render("view", array("model" => Articles, "subnav" => array("article" => Articles, "children" => array()), "upload" => array("form" => Submissions, "submissions" => array(Submissions, Submissions, Submissions, Submissions, ...), "message" => false)))
87         
88         $upload = $this->uploadDownload();
89 
90         
91         $this->render('view',array(
92             'model'=>$article,'subnav'=>$subnav,'upload'=>$upload
93         ));
94     }
95     
96     public function actionNews($id = null, $year = null)
97     {
#23
+
 /home1/grampiansexualhe/public_html/index.php(17): CApplication->run()
12 defined('YII_DEBUG') or define('YII_DEBUG',true);
13 // specify how many levels of call stack should be shown in each log message
14 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
15 
16 require_once($yii);
17 Yii::createWebApplication($config)->run();
2024-03-29 00:03:38 Apache Yii Framework/1.1.14