PHP notice

Undefined offset: 0

/var/www/vhosts/vmi141456.contaboserver.net/surbzoravor.am/frontend/controllers/EventController.php(5)

01 <?php
02 class EventController extends FrontendController{
03     public function actionView(){
04         $event =  Event::model()->getEventById($_GET['id']);
05         $other = Reading::model()->getReadingByParenId($event['0']['day_id']);
06         $day =  Day::model()->findByPk($event['0']['day_id']);
07         $fbHeader = $day->name.' '.$event['0']['name'];
08         $event['0']['name'] = $fbHeader;
09         if (strlen($fbHeader) > 100) {
10             $firts_point = strpos($fbHeader,' ',100);
11             $fbHeader=substr($fbHeader,0,$firts_point+1).'...';
12         }
13         $this->render('view',array('event'=>$event,'other'=>$other, 'fbHeader' => $fbHeader));
14     }
15 }

Stack Trace

#14
+
 /var/www/vhosts/vmi141456.contaboserver.net/surbzoravor.am/frontend/www/index.php(24): CApplication->run()
19 Yii::setPathOfAlias('bootstrap', ROOT_DIR . '/vendor/clevertech/yii-booster/src');
20 # For obvious reasons, backend entry point is constructed of specialised WebApplication and config
21 Yii::createApplication(
22     'FrontendWebApplication',
23     ROOT_DIR . '/frontend/config/main.php'
24 )->run();
25 
2024-03-29 17:09:32 nginx/1.16.1 Yii Framework/1.1.14