I am installing my existing Yii developed application on a new development PC and am running into an issue (which I don’t have on my existing development PC).
When trying to login to my application I get the following error:
This code works on other development PC, so there must be something else causing it. Anyway, this is how the code looks like:
SecurityController is a component class which extends CController, and the getSecurityKey() only returns a string.
Thank you Joblo, indeed declaring it static solved that particular problem.
After I managed to login, I noticed that this message appears in a couple of more places, which would require me to review the entire code to ensure they are statically declared.
However, the confusing part is why it works on the other development PC without being declared static?
I had error reporting E_ALL switched on which was showing these messages. However, when turning it off I don’t see them anymore and it is working as it should. But it’s strange since I should be able to have the error reporting on and still be able to use the application?
The only other difference is that I’m using PHP 5.4 on the new PC while only using PHP 5.3 on the old.