eval()'d code(1)

Iam getting the error … please help… iam using dashboard to update news. its not working.

PHP notice

Trying to get property of non-object

/home/sfomra/sites/smkfomra.net/campusManager/yii/framework/base/CComponent.php(607) : eval()'d code(1)

Stack Trace

#0 + /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/base/CComponent.php(607): eval()

#1

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/grid/CDataColumn.php(139): CComponent->evaluateExpression("($data->departmentID==null)? "" : $data->department->name", array("data" => Sitepage, "row" => 3))

#2

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/grid/CGridColumn.php(138): CDataColumn->renderDataCellContent(3, Sitepage)

#3

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/grid/CGridView.php(517): CGridColumn->renderDataCell(3)

#4

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/grid/CGridView.php(490): CGridView->renderTableRow(3)

#5

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/grid/CGridView.php(400): CGridView->renderTableBody()

#6

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/CBaseListView.php(158): CGridView->renderItems()

#7

unknown(0): CBaseListView->renderSection(array("{items}", "items"))

#8

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/CBaseListView.php(141): preg_replace_callback("/{(\w+)}/", array(CGridView, "renderSection"), "{summary} {items} {pager}")

#9

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/zii/widgets/CBaseListView.php(126): CBaseListView->renderContent()

#10

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CBaseController.php(174): CBaseListView->run()

#11

  • /home/sfomra/sites/smkfomra.net/campusManager/protected/views/sitepage/index.php(73): CBaseController->widget("zii.widgets.grid.CGridView", array("id" => "sitepage-grid", "dataProvider" => CActiveDataProvider, "filter" => Sitepage, "columns" => array("id", "name", "title", "date", …)))

#12

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CBaseController.php(127): require("/home/sfomra/sites/smkfomra.net/campusManager/protected/views/si…")

#13

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/home/sfomra/sites/smkfomra.net/campusManager/protected/views/si…", array("model" => Sitepage), true)

#14

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(870): CBaseController->renderFile("/home/sfomra/sites/smkfomra.net/campusManager/protected/views/si…", array("model" => Sitepage), true)

#15

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(783): CController->renderPartial("index", array("model" => Sitepage), true)

#16

  • /home/sfomra/sites/smkfomra.net/campusManager/protected/controllers/SitepageController.php(235): CController->render("index", array("model" => Sitepage))

#17

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/actions/CInlineAction.php(50): SitepageController->actionIndex()

#18

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(309): CInlineAction->runWithParams(array())

#19

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/filters/CFilterChain.php(134): CController->runAction(CInlineAction)

#20

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()

#21

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(1146): CFilter->filter(CFilterChain)

#22

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)

#23

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain)

#24

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(292): CFilterChain->run()

#25

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array("accessControl"))

#26

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CWebApplication.php(276): CController->run("index")

#27

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/web/CWebApplication.php(135): CWebApplication->runController("sitepage/index")

#28

  • /home/sfomra/sites/smkfomra.net/campusManager/yii/framework/base/CApplication.php(162): CWebApplication->processRequest()

#29

  • /home/sfomra/sites/smkfomra.net/campusManager/index.php(14): CApplication->run()

Probable quoting problem (in DataColumn). Mix with single quotes or escape double quotes.