PHP notice

Trying to get property of non-object

/srv/www/ylcss_web/protected/views/photoAlbums/view.php(13)

01 <?php
02 /**
03  * @var PhotoAlbums $photoAlbum
04  * @var $year int
05  * @var PhotoAlbumsController $this
06  */
07 
08 $this->breadcrumbs["校園相簿"]='index';
09 
10 if ($year)
11     $this->breadcrumbs["校園相簿"]='index?year='.$year;
12 
13 $this->breadcrumbs[]="$photoAlbum->albumName";
14 
15 $this->registerCssFile('/js/colorbox/example1/colorbox.css');
16 $this->registerScriptFile('/js/colorbox/jquery.colorbox-min.js', CClientScript::POS_END);
17 
18 /** @var GalleryPhoto[] $photos */
19 $photos=$photoAlbum->galleryBehavior->getGallery()->galleryPhotos; ?>
20 <style>
21     .album_description{
22         margin: 1em 0;
23         padding: 5px 3%;
24         display: block;
25         background-color: #C0E4F8;

Stack Trace

#4
+
 /srv/www/ylcss_web/protected/controllers/PhotoAlbumsController.php(33): CController->render("view", array("photoAlbum" => null, "year" => null))
28         $photoAlbum = PhotoAlbums::model()->findByPk($id);
29 
30         $this->render('view', array(
31             'photoAlbum'=>$photoAlbum,
32             'year'=>$year
33         ));
34     }
35 }
#14
+
 /srv/www/ylcss_web/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-28 16:57:16 nginx/1.16.1 Yii Framework/1.1.18