PHP Error

Description

Attempt to read property "user_id" on null

Source File

/home/taidesiv/public_html/protected/views/artpremises/view.php(61)

00049:     'url'=>array("/profiili/$model->artistprofile_id/$artcategory->artcategory_url_name"), 'itemOptions'=>array('class'=> $artcategory_url_name === $artcategory->artcategory_url_name ? 'active' : 'parent')));*/
00050: ?>
00051: 
00052: <div class="paginate tabs">
00053: <?php
00054: 
00055: foreach($sub_pages as $key => $val)
00056: {
00057:     if ($key == 3 || $key == 2)
00058:         continue;  // Temporarily not showing Wall or Usages.
00059: 
00060:     $displayable = $sub_pages_human_viewable_text[$key];
00061: if ($model->user->user_id == Yii::app()->user->id)
00062: { 00063: if ($key == 1) 00064: { 00065: $displayable .= '&nbsp;('.count ($model->gallery_images).')'; 00066: } 00067: } 00068: 00069: if ($tab == $key) 00070: { 00071: ?> 00072: <a href="<?php echo Yii::app()->baseUrl .'/'. $model->artpremises_url_suffix .'/'. $sub_pages_human_viewable_url[$key];?>" class="active"><?php echo $displayable; ?></a> 00073: <?php

Stack Trace

#0 /home/taidesiv/yii/framework/web/CBaseController.php(119): require()
#1 /home/taidesiv/yii/framework/web/CBaseController.php(88): ArtpremisesController->renderInternal()
#2 /home/taidesiv/yii/framework/web/CController.php(742): ArtpremisesController->renderFile()
#3 /home/taidesiv/yii/framework/web/CController.php(681): ArtpremisesController->renderPartial()
#4 /home/taidesiv/public_html/protected/controllers/ArtpremisesController.php(140): ArtpremisesController->render()
#5 /home/taidesiv/yii/framework/web/actions/CInlineAction.php(32): ArtpremisesController->actionView()
#6 /home/taidesiv/yii/framework/web/CController.php(300): CInlineAction->run()
#7 /home/taidesiv/yii/framework/web/filters/CFilterChain.php(129): ArtpremisesController->runAction()
#8 /home/taidesiv/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#9 /home/taidesiv/yii/framework/web/CController.php(993): CAccessControlFilter->filter()
#10 /home/taidesiv/yii/framework/web/filters/CInlineFilter.php(59): ArtpremisesController->filterAccessControl()
#11 /home/taidesiv/yii/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter()
#12 /home/taidesiv/yii/framework/web/CController.php(283): CFilterChain->run()
#13 /home/taidesiv/yii/framework/web/CController.php(257): ArtpremisesController->runActionWithFilters()
#14 /home/taidesiv/yii/framework/web/CWebApplication.php(320): ArtpremisesController->run()
#15 /home/taidesiv/yii/framework/web/CController.php(653): CWebApplication->runController()
#16 /home/taidesiv/public_html/protected/controllers/ArtistprofileController.php(1023): ArtistprofileController->forward()
#17 /home/taidesiv/public_html/protected/controllers/ArtistprofileController.php(108): ArtistprofileController->loadModel()
#18 /home/taidesiv/yii/framework/web/actions/CInlineAction.php(32): ArtistprofileController->actionView()
#19 /home/taidesiv/yii/framework/web/CController.php(300): CInlineAction->run()
#20 /home/taidesiv/yii/framework/web/filters/CFilterChain.php(129): ArtistprofileController->runAction()
#21 /home/taidesiv/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#22 /home/taidesiv/yii/framework/web/CController.php(993): CAccessControlFilter->filter()
#23 /home/taidesiv/yii/framework/web/filters/CInlineFilter.php(59): ArtistprofileController->filterAccessControl()
#24 /home/taidesiv/yii/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter()
#25 /home/taidesiv/yii/framework/web/CController.php(283): CFilterChain->run()
#26 /home/taidesiv/yii/framework/web/CController.php(257): ArtistprofileController->runActionWithFilters()
#27 /home/taidesiv/yii/framework/web/CWebApplication.php(320): ArtistprofileController->run()
#28 /home/taidesiv/yii/framework/web/CWebApplication.php(120): CWebApplication->runController()
#29 /home/taidesiv/yii/framework/base/CApplication.php(135): CWebApplication->processRequest()
#30 /home/taidesiv/public_html/index.php(12): CWebApplication->run()
2024-03-28 14:36:44 Apache Yii Framework/1.1.1