CodeIgniter Forums
PHP Fatal error: Using $this when not in object context - 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: PHP Fatal error: Using $this when not in object context (/showthread.php?tid=27827)



PHP Fatal error: Using $this when not in object context - El Forum - 02-22-2010

[eluser]keshavkuruva[/eluser]
Hi,

I am facing a new error suddenly from yesterday. I first thought that the reason for this was at this line :

$currentUrl = $this->config->site_url().$this->uri->uri_string();


but when I removed this , the error number showed up here :
$this->session->userdata

so . it was showing off errors wherever $this appeared.

I didn't make any changes to the codebase nor the system libraries.

Can anyone quickly let me know what exactly the problem could be?

Thanks for the help in advance,
Keshav.