PHP warning

Attempt to read property "id_trofei" on null

/var/www/malossi/html/protected/views/site/classifiche.php(13)

01 <?php $page = 'home'; ?>
02 <?php require_once(Yii::app()->request->baseUrl . "commons/head_classifiche.php") ?>
03 <?php require_once(Yii::app()->request->baseUrl . "commons/header.php") ?>
04 <?php require_once(Yii::app()->request->baseUrl . "commons/slider_home.php") ?>
05 
06 <?php
07 $basepath = "/var/www/thala/apptrofei.thala.biz/html/";
08 $lingua = TblLingue::model()->findByAttributes(array('sigla' => $ln));
09 $eventoSel = '';
10 $trofeiList = array();
11 if ($evento != '') {
12     $eventoSel = TblCalendarioGare::model()->findByPk($evento);
13     $trofeiList = explode(',', $eventoSel->id_trofei);
14 }
15 if ($annoSelezionato == '') {
16     $annoSelezionato = date("Y");
17 }
18 
19 $trofei = TblPagesTrofei::model()->findAll(
20     array(
21         "condition" => " anno = $annoSelezionato",
22         "order" => "nome asc",
23     )
24 );
25 

Stack Trace

#4
+
 /var/www/malossi/html/protected/controllers/SiteController.php(545): CController->render("classifiche", array("annoSelezionato" => "2020", "trofeoSelezionato" => "generale", "evento" => "25"))
540         } elseif (Yii::app()->session['ln'] != $ln) {
541             Yii::app()->session['ln'] = $ln;
542         }
543 
544         $this->render('classifiche', array(
545             'annoSelezionato' => $anno, 'trofeoSelezionato' => $id, 'evento' => $evento
546         ));
547     }
548 
549     public function actionIscriviOspiteMob()
550     {
#14
+
 /var/www/malossi/html/index.php(24): CApplication->run()
19     Yii::app()->session['ln'] = 'it';
20 }
21 
22 
23 
24 $app->run();
25 
26 
27 
28 
2024-03-28 18:45:47 Apache Yii Framework/1.1.13