PHP notice

Trying to get property of non-object

/var/www/html/mdpweb/protected/controllers/MessageController.php(2240)

2228                         if (!empty($model->friend_email7))
2229                         {
2230                             $this->sendForwardEmail($message, $model->your_name, $model->email, $model->friend_name7, $model->friend_email7, $model->personal_message, $model->friend_id7);
2231                         }
2232                         
2233                         Yii::app()->user->setFlash('your_name', $model->your_name);                    
2234                         Yii::app()->user->setFlash('success', true);
2235                         $this->refresh();
2236                     }
2237                 }
2238 
2239                 // Check custom defined layout exist or not
2240                 $templatePath = Yii::app()->params['layoutPath'] . $message->me_client . '/forward.php';
2241                 
2242                 if (file_exists($templatePath)) {            
2243                     echo $this->renderFile($templatePath, array(
2244                             'model'=>$model,
2245                             'message'=>$message,
2246                     ));                
2247                 }
2248                 else {                
2249                 
2250                     echo $this->render('forward', array(
2251                             'model'=>$model,
2252                             'message'=>$message,

Stack Trace

#12
+
 /var/www/html/mdpweb/index.php(22): CApplication->run()
17     $_COOKIE['PHPSESSID'] = $_POST['PHPSESSID'];
18     $_COOKIE['YII_CSRF_TOKEN'] = $_POST['TOKEN_FOR_COOKIE'];
19 }
20 
21 require_once($yii);
22 Yii::createWebApplication($config)->run();
2024-03-29 03:49:36 Apache/2.2.15 (CentOS) Yii Framework/1.1.14