PHP notice

Trying to get property 'titulo' of non-object

/home/userinsite/public_html/harriweb/protected/views/site/evento.php(128)

116           <div class="custom-heading-01 triggerAnimation animated" data-animate="fadeInUp">
117             <h2>Videos</h2>
118           </div>
119         </div>
120         <?php foreach ($evento['videos'] as $video): ?>
121           <div class="col-md-6 col-xs-12 mb-0">
122             <div class="video-item">
123               <div class="video-media">
124                 <iframe src="<?= $video->link ?>" width="100%" height="312" frameborder="0" 
125                         webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
126               </div>
127               <h2>
128                 <?= Cancion::model()->findbyPk($video->id_cancion)->titulo ?>
129               </h2>
130             </div>
131           </div>
132         <?php endforeach; ?>
133       </div>
134     </div>
135   </div>
136 <?php endif; ?>
137 
138 <?php if ($evento['fotos']): ?>
139   <div class="page-content custom-background custom-section-padding mb-130 bkg-border"
140        style="background-image: url(<?= Yii::app()->getBaseUrl() ?>/files/portal/separador/<?= $separadores[1]['img_url'] ?>);">

Stack Trace

#4
+
 /home/userinsite/public_html/harriweb/protected/controllers/SiteController.php(142): CController->render("evento", array("evento" => array("info" => array("id_evento" => "44", "id_tipo_evento" => "2", "slug" => "six-days-a-week-2261008", "titulo" => "Six Days A Week 2", ...), "fotos" => array(), "videos" => array(Video), "setlist" => array(), ...), "separadores" => array(array("id_separador" => "4", "img_url" => "4_02030747.jpg", "estado" => "1"), array("id_separador" => "6", "img_url" => "6_02234635.jpg", "estado" => "1"), array("id_separador" => "3", "img_url" => "3_02023822.jpg", "estado" => "1"))))
137         $evento['portada'] = $portada->attributes;
138       } else {
139         $evento['portada'] = UPortal::getPortada(5);
140       }
141       $separadores = UPortal::getSeparadores(3);
142       $this->render('evento', ['evento' => $evento, 'separadores' => $separadores]);
143     } else {
144       throw new Exception("Ocurrio un error, evento no encontrado", 101);
145     }
146   }
147 
#14
+
 /home/userinsite/public_html/harriweb/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-29 06:29:54 Apache Yii Framework/1.1.20