When working with object oriented php, many developers might bumb into a error like the below:
Cannot access empty property in ...
The eason this happens is most likely due to a miss-placed doller-sign in the code. This can happen to almost anyone who copy-paste a lot of code.
When accessing member properties trough the methods of a class, you might be getting an error saying: "Cannot access empty property in ..." – this may be because you have the following somewhere in your php code:
$this->$username = '';
To get rid of the problem entirely, just remove the doller sign, like shown below:
$this->username = '';