php error at the time of hosting

0

I have a problem at the time of hosting a college job, the problem is this one:

Onthelocalhostthiserrordoesnotappear.

Theerrormentionedinline98ofthethemecode/topisthis

<?phpif($this->session->flashdata('success')!=null){?><divclass="alert alert-success">
                          <button type="button" class="close" data-dismiss="alert">&times;</button>
                          <?php echo $this->session->flashdata('success');?>
                       </div>
                  <?php }?>

                  <?php if(isset($view)){echo $this->load->view($view);}?>

The Mapos controller code is this:

    public function index() {

    $this->data['ordens'] = $this->mapos_model->getOsAbertas();
    $this->data['produtos'] = $this->mapos_model->getProdutosMinimo();
    $this->data['os'] = $this->mapos_model->getOsEstatisticas();
    $this->data['estatisticas_financeiro'] = $this->mapos_model->getEstatisticasFinanceiro();
    $this->data['menuPainel'] = 'Painel';
    $this->data['view'] = 'mapos/painel';
    $this->load->view('tema/topo',  $this->data);

}

The last error is from an index file of codeigniter, which I did not modify anything, because it is default. I can not find what is giving this error, all applications are working normally, but if this error does not disappear, the teacher will not accept the work. He already warned that the application has to be working in the hosting. What can I do to get rid of this error, since it is not giving anything to the application?

    
asked by anonymous 21.05.2017 / 14:39

1 answer

1

I found the error, the manual that the teacher gave to work with the codeigniter was out of date, I'm using the latest version of the framework, then at line 98 of the code of the theme / top is this code that was:

<?php if(isset($view)){echo $this->load->view($view);}?>

The right one for the newer versions looks like this: <?php if(isset($view)){ $this->load->view($view);}?> Without the echo.

    
22.05.2017 / 14:00