PHP notice

Undefined variable: model

/home/u439419125/domains/events.az/private_html/conf/frontend/protected/controllers/SiteController.php(606)

594         $model = Article::model()->withLang()->findByPk($id, array('condition'=>'active = 1 AND type = 0'));
595         if( count( $model ) <= 0 )
596             throw new CHttpException(404,'The requested page does not exist.');
597         
598         $model->read_count++;
599         $model->save(false);
600         
601         $this->render('more/mnews', array('model'=>$model));
602     }
603     
604     public function actionOrganizers()
605     {   
606         $this->render('organizers', array('model'=>$model));
607     }
608     
609     public function actionShowImage($id, $type)
610     {
611         $type = htmlentities(urlencode($type));
612         $classFile = file_exists(Yii::getPathOfAlias('common.models').DIRECTORY_SEPARATOR.$type.'.php');
613         if( !$classFile )
614             throw new CHttpException(404,'The requested page does not exist.');
615             
616         $define = null;
617         if( $type == 'ArticleFiles' )
618             $define = ARTICLEFILES;

Stack Trace

#8
+
 /home/u439419125/domains/events.az/private_html/conf/common/behaviors/WebApplicationTypeBehavior.php(19): CApplication->run()
14         $this->_endName = $name;
15         
16         $this->onModuleCreate = array($this, 'changeModulePaths');
17         $this->onModuleCreate(new CEvent ($this->owner));
18         
19         $this->owner->run();        
20     }
21     
22     public function onModuleCreate($event)
23     {
24         $this->raiseEvent('onModuleCreate', $event);        
#11
+
 /home/u439419125/domains/events.az/public_html/index.php(31): CComponent->__call("runEnd", array("frontend"))
26 define('EVENTSPLACESFILES', FILES.'eventsPlaces/', true);
27 define('EVENTSFILES', FILES.'events/', true);
28 define('DOWNLOADPATH', FILES.'download/', true);
29 
30 require_once($yii);
31 Yii::createWebApplication($config)->runEnd('frontend');
#12
+
 /home/u439419125/domains/events.az/public_html/index.php(31): CWebApplication->runEnd("frontend")
26 define('EVENTSPLACESFILES', FILES.'eventsPlaces/', true);
27 define('EVENTSFILES', FILES.'events/', true);
28 define('DOWNLOADPATH', FILES.'download/', true);
29 
30 require_once($yii);
31 Yii::createWebApplication($config)->runEnd('frontend');
2024-03-19 08:43:22 LiteSpeed Yii Framework/1.1.13