1

We are experiencing an issue when an invalid url is passed to cake. This loads the missing_controller.ctp view correctly but $_SESSION variable is empty.

We have tested this on 1.3 and 2.0 and in both version $_SESSION is empty when the missing_controller view is rendered.

Is this done on purpose?

Thanks

Regards Gabriel

Gabriel Spiteri
  • 4,896
  • 12
  • 43
  • 58

1 Answers1

4

Did you imported the Session component in Controller? Like this:

<?php
class MissingController extends AppController{
var $components = array('Session');
var $helpers = array('Session');
}

Try to access the data in $_SESSION with $this->Session->read('This.That');

fzmaster
  • 388
  • 2
  • 5
  • exactly - $_SESSION might empty if no call has been made to the session yet through proper channels - $this->Session->read() – mark Feb 06 '12 at 17:00