![]() |
Problem with constructor when checking $this->session->userdata() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem with constructor when checking $this->session->userdata() (/showthread.php?tid=47419) |
Problem with constructor when checking $this->session->userdata() - El Forum - 12-08-2011 [eluser]condoace[/eluser] I have a controller which I would like to keep private entirely. I have created a condition in the controllers constructor to check if a session exists and then do a redirect. It works fine when there is no session (i.e. does the redirect), but if a session exists it comes up with this error, - also see code: ERROR Fatal error: Can't use method return value in write context in C:\Users\ME\xampp\htdocs\ggk\application\models\model_empl.php on line 9 CONTROLLER Code: function __construct(){ |