私は自分のCMSに問題があります。致命的なエラー:未定義のメソッドを呼び出すModule_model :: active()
public function bugtracker()
\t {
\t \t $this->load->model('CMS_model', 'CMSManager');
\t \t if($this->session->has_userdata('guid') || $this->ModuleManager->active(23) != TRUE){
\t \t \t $data['account'] = $this->AccountManager->info('guid', $this->session->userdata('guid'));
\t \t }
\t \t else{
\t \t \t $data = array();
\t \t }
\t \t $data['bugtrackers'] = $this->CMSManager->bugtrackers();
\t \t $this->layout->view('support/bugtracker', $data);
\t \t foreach($data['bugtrackers'] as $bugtracker){
\t \t \t if(isset($_POST['vote'])){
\t \t \t \t if(!$this->session->has_userdata('guid')){
\t \t \t \t \t redirect('home/');
\t \t \t \t }
\t \t \t \t else{
\t \t \t \t \t $this->CMSManager->add_vote($bugtracker->id, $bugtracker->vote_account.$data['account']->guid.'|', $bugtracker->vote + 1);
\t \t \t \t \t $this->message->alert('1', 'Vote accepté, redirection en cours...', site_url('support/bugtracker'), '3');
\t \t \t \t }
\t \t \t }
\t \t }
\t \t if(isset($_POST['post'])){
\t \t \t if(!$this->session->has_userdata('guid')){
\t \t \t \t redirect('home/');
\t \t \t }
\t \t \t else{
\t \t \t \t $title = post($this->input->post('title'));
\t \t \t \t $content = post(nl2br($this->input->post('content')));
\t \t \t \t if(empty($title) || empty($content)){
\t \t \t \t \t $this->message->alert('2', 'Champs vides.', site_url('support/bugtracker'), '3');
\t \t \t \t }
\t \t \t \t elseif(strlen($title) > 50 || strlen($title) < 5){
\t \t \t \t \t $this->message->alert('2', 'La longueur de votre titre est incorrect.', site_url('support/bugtracker'), '3');
\t \t \t \t }
\t \t \t \t elseif(strlen($content) < 10){
\t \t \t \t \t $this->message->alert('2', 'La longueur de votre report est incorrect.', site_url('support/bugtracker'), '3');
\t \t \t \t }
\t \t \t \t else{
\t \t \t \t \t $this->CMSManager->add_bug($data['account']->guid, $title, $data['account']->guid.'|', $content);
\t \t \t \t \t $this->message->alert('1', 'Bug publié, redirection en cours...', site_url('support/bugtracker'), '3');
\t \t \t \t }
\t \t \t }
\t \t }
\t }
がどのように私はこのエラーを修正することができます
Fatal error: Call to undefined method Module_model::active() in C:\wamp\www\CI\application\controllers\Support.php on line 107 A PHP Error was encountered
Severity: Error
Message: Call to undefined method Module_model::active()
Filename: controllers/Support.php
Line Number: 107
これは、コードは次のとおりです。私は私のバグトラッカーを使用する場合、私はこのエラーを取得しますか?
複雑な問題です。おそらくコードを継承していて、どこにいるのか正確には分かりません。静的メソッド:Module_model :: active() 'の呼び出しはありません。この行は、行番号です。 107?たぶん 'if($ this-> session-> has_userdata( 'guid')|| $ this-> ModuleManager-> active(23)!= TRUE){'?静的な機能を削除することも解決策ではなく、以前のソフトウェアメーカーは意図を持っていたため、調査する必要があります。質問に詳細を追加してみてください。 – cssBlaster21895