PHP notice

Trying to get property 'donorphoto' of non-object

/disk1/dao/ephku/html/protected/views/site/profdetail.php(44)

32 .poprof div.info h2 { line-height:1; padding:0; margin:0; }
33 .poprof div.bio { border-top:solid 1px #ccc; padding:5px 0; margin-top:5px; height:400px; overflow-y:scroll; }
34 .topbtnback { margin:0 0 25px 0; }
35 </style>
36 
37 <div id="profdetailpg">
38     <?/*<a href="<?echo WebLib::pgurl($backpgid,$lang);?>">*/?><img class='topbtnback' onclick="goback();"
39                     src='<?echo WebLib::appurl("/images/spacer.gif");?>' alt="<?echo $lback;?>" /><?/*</a>*/?>
40     <table id='frmwrk' cellpadding='0' cellspacing='0'>        
41         <!-- Professorship Section -->
42         <tr id="shiprow">
43             <td class='donorimg photo'><? //if (trim($ship->donorphoto)!="") { 
44                 $dgsrc=(trim($ship->donorphoto)=="")?WebLib::appurl("/images/defaultpro.jpg"):WebLib::appurl("/uploads/images/resize/".$ship->donorphoto);
45                 echo "<img src='$dgsrc' alt=\"".$ship->getAttribute("donorname_".$lang)."\" />";
46                 //echo "<img src='".WebLib::appurl("/uploads/images/resize/".$ship->donorphoto)."' alt=\"".$ship->getAttribute("donorname_".$lang)."\" />";
47              ?></td>
48             <td class='shipinfo info'>
49                 <h2><?echo str_replace("\r\n","<br />",$ship->getAttribute("name_".$lang));?></h2>
50                 <div class='detail'> <?
51                     $sdetail=$ship->getAttribute("citation_".$lang);
52                     if (trim($sdetail)=="" && $lang=="cn")
53                         $sdetail="(<a href=\"javascript:switch_lang('cn','en');\">請按此參閱英文版本</a>)";
54                     echo $sdetail;
55                 ?></div>
56             </td>

Stack Trace

#4
+
 /disk1/dao/ephku/html/protected/controllers/SiteController.php(78): CController->render("profdetail", array("ship" => null, "prof" => Professor, "visit" => false, "proflist" => array()))
73             else array_push($proflist,$pi);
74         }            
75         $this->livepg = Page::model()->findByAttributes(array("template"=>"Professorship","isCms"=>$iscms,"isDel"=>0));
76         $this->pgc = Pagecontent::model()->findByAttributes(array("PageID"=>$this->livepg->PageID,"lang"=>$lang,"isCms"=>$iscms));
77         $this->layout="general";        
78         $this->render("profdetail",array("ship"=>$ship,"prof"=>$prof,"visit"=>false,"proflist"=>$proflist));        
79     }
80     
81     public function actionViewVisitProfessorship($lang,$id) {
82         $this->lang=$lang; $iscms=0;
83         $ship = Professorship::model()->findByAttributes(array("id"=>$id,"iscms"=>$iscms,"active"=>1,"isDel"=>0));        
#14
+
 /disk1/dao/ephku/html/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
14 //$app = Yii::createWebApplication($config);
15 //Yii::app()->db->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);//Enable Multi-query in PDO
16 //$app->run();
2024-03-29 22:35:49 Apache Yii Framework/1.1.13