Here’s what it looks like when I have
array('name'=>'history.play_date','sortable'=>'true','value'=>'($data->history) ? $data->history->play_date : "never played"'),
Here’s the stack trace when I have
array('name'=>'history.play_date','sortable'=>'true','value'=>'$data->history->play_date'),
2010/09/03 08:43:57 [error] [php] Trying to get property of non-object (/opt/yii-1.1.3.r2247/framework/base/CComponent.php(616) : eval()'d code:1)
Stack trace:
#0 /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CGridColumn.php(135): CDataColumn->renderDataCellContent()
#1 /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CGridView.php(457): CDataColumn->renderDataCell()
#2 /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CGridView.php(430): CGridView->renderTableRow()
#3 /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CGridView.php(343): CGridView->renderTableBody()
#4 /opt/yii-1.1.3.r2247/framework/zii/widgets/CBaseListView.php(158): CGridView->renderItems()
#5 unknown(0): CGridView->renderSection()
#6 /opt/yii-1.1.3.r2247/framework/zii/widgets/CBaseListView.php(141): preg_replace_callback()
#7 /opt/yii-1.1.3.r2247/framework/zii/widgets/CBaseListView.php(127): CGridView->renderContent()
#8 /opt/yii-1.1.3.r2247/framework/web/CBaseController.php(166): CGridView->run()
#9 /home/patrick/websites/emodmail.selfip.org/m3/test/protected/views/song/admin.php(77): SongController->widget()
#10 /opt/yii-1.1.3.r2247/framework/web/CBaseController.php(119): require()
#11 /opt/yii-1.1.3.r2247/framework/web/CBaseController.php(88): SongController->renderInternal()
#12 /opt/yii-1.1.3.r2247/framework/web/CController.php(798): SongController->renderFile()
#13 /opt/yii-1.1.3.r2247/framework/web/CController.php(739): SongController->renderPartial()
#14 /home/patrick/websites/emodmail.selfip.org/m3/test/protected/controllers/SongController.php(186): SongController->render()
#15 /opt/yii-1.1.3.r2247/framework/web/actions/CInlineAction.php(32): SongController->actionAdmin()
#16 /opt/yii-1.1.3.r2247/framework/web/CController.php(300): CInlineAction->run()
#17 /opt/yii-1.1.3.r2247/framework/web/filters/CFilterChain.php(129): SongController->runAction()
#18 /opt/yii-1.1.3.r2247/framework/web/filters/CFilter.php(41): CFilterChain->run()
#19 /opt/yii-1.1.3.r2247/framework/web/CController.php(1049): CAccessControlFilter->filter()
#20 /opt/yii-1.1.3.r2247/framework/web/filters/CInlineFilter.php(59): SongController->filterAccessControl()
#21 /opt/yii-1.1.3.r2247/framework/web/filters/CFilterChain.php(126): CInlineFilter->filter()
#22 /opt/yii-1.1.3.r2247/framework/web/CController.php(283): CFilterChain->run()
#23 /opt/yii-1.1.3.r2247/framework/web/CController.php(257): SongController->runActionWithFilters()
#24 /opt/yii-1.1.3.r2247/framework/web/CWebApplication.php(324): SongController->run()
#25 /opt/yii-1.1.3.r2247/framework/web/CWebApplication.php(121): CWebApplication->runController()
#26 /opt/yii-1.1.3.r2247/framework/base/CApplication.php(135): CWebApplication->processRequest()
#27 /home/patrick/websites/emodmail.selfip.org/m3/test/index.php(13): CWebApplication->run()
REQUEST_URI=/m3/test/index.php?r=song/admin
in /opt/yii-1.1.3.r2247/framework/base/CComponent.php(616) : eval()'d code (1)
in /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CDataColumn.php (132)
in /opt/yii-1.1.3.r2247/framework/zii/widgets/grid/CGridColumn.php (135)