PHP Error

Description

Trying to get property of non-object

Source File

/web/oldschool/rv/protected/components/GraduationFilter.php(135)

00123: 
00124:                 $_condition = "namespaceId = :namespaceId AND ownerId != ''";
00125:                 $_param = array(":namespaceId"=>ns::GRADUATION);
00126: 
00127:                 if($this->selectedYear != null)
00128:                 {
00129:                     $_condition .= " AND item.year = :year";
00130:                     $_param[':year'] = $this->selectedYear;
00131:                 }
00132: 
00133:                 if($this->selectedCategory != null)
00134:                 {
00135: $_categoryId = category::model()->find('name = :name', array(':name'=>str_replace("-", " ", $this->selectedCategory)))->id;
00136: $_condition .= " AND item.categoryId = :categoryId"; 00137: $_param[':categoryId'] = $_categoryId; 00138: } 00139: 00140: $criteria->condition = $_condition; 00141: $criteria->params = $_param; 00142: 00143: foreach(item::model()->with(array('owner'=>array('select'=>'name, friendlyName')))->findAll($criteria) as $_user) 00144: { 00145: $users[$_user->owner->friendlyName] = $_user->owner->name; 00146: } 00147: }

Stack Trace

#0 /web/oldschool/yii/framework/web/CBaseController.php(154): GraduationFilter->run()
#1 /web/oldschool/rv/protected/views/webPage/Page.php(71): WebPageController->widget()
#2 /web/oldschool/yii/framework/web/CBaseController.php(119): require()
#3 /web/oldschool/yii/framework/web/CBaseController.php(88): WebPageController->renderInternal()
#4 /web/oldschool/yii/framework/web/CController.php(701): WebPageController->renderFile()
#5 /web/oldschool/yii/framework/web/CController.php(640): WebPageController->renderPartial()
#6 /web/oldschool/rv/protected/controllers/WebPageController.php(85): WebPageController->render()
#7 /web/oldschool/rv/protected/controllers/WebPageController.php(21): WebPageController->renderItem()
#8 /web/oldschool/yii/framework/web/actions/CInlineAction.php(32): WebPageController->actionPage()
#9 /web/oldschool/yii/framework/web/CController.php(300): CInlineAction->run()
#10 /web/oldschool/yii/framework/web/CController.php(278): WebPageController->runAction()
#11 /web/oldschool/yii/framework/web/CController.php(257): WebPageController->runActionWithFilters()
#12 /web/oldschool/yii/framework/web/CWebApplication.php(332): WebPageController->run()
#13 /web/oldschool/yii/framework/web/CWebApplication.php(120): CWebApplication->runController()
#14 /web/oldschool/yii/framework/base/CApplication.php(134): CWebApplication->processRequest()
#15 /web/oldschool/rv/index.php(12): CWebApplication->run()
2024-03-28 21:51:53 Apache/2.4.29 (Ubuntu) Yii Framework/1.0.8