Fatal error: Using $this when not in object context
I was having some trouble today, figuring this out. But it is pretty basic.
In my case, I have a scope problem.
So lets say
class SomeClass { public $variable = 'variable'; public function __construct() { } public function sampleMethod() { return $this->variable; } }You will get returned Fatal error: Using $this when not in object context as an error. This is because when you use the scope, you do not have access to the $this variable, since it runs that method as a function, basicly.