fixing php notice

we should at least initialize all our important variables
Merge pull request #2337 from jadwigo/master

fixing php notice