PHP warning

Creating default object from empty value

/var/www/html/uprav1/protected/controllers/SiteController.php(204)

192             $this->layout='column2';
193             $this->render('index');
194         }
195     }
196     
197     public function actionStattya()
198     {
199         if(isset($_GET['id']))
200         {
201             if(isset($_GET['typ']) && $_GET['typ']=='stattya')
202             {
203                 $model = Statti::model()->find("m_id = :m_id",array(":m_id"=>$_GET['id']));
204                 $model->tekst=preg_replace('/\[code\]/','',$model->tekst,1);
205                 $last = strrpos($model->tekst, '[/code]');
206                 $total = strlen($model->tekst) - 1;
207                 $stop = $last - $total+5;
208                 $model->tekst = substr_replace($model->tekst, '', $last-1, $stop);
209                 //$model->tekst=str_replace('[/code]','',$model->tekst);
210                 $menu = Menu::model()->findByPk($_GET['id']);
211                 $model->m_id = $model->id;
212             }
213             else
214             {
215                 $model = Statti::model()->findByPk($_GET['id']);
216                 $model->tekst=preg_replace('/\[code\]/','',$model->tekst,1);

Stack Trace

#12
+
 /var/www/html/uprav1/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();
2024-03-28 16:34:41 Apache/2.4.10 (Debian) Yii Framework/1.1.13