fixed php errors
Merge pull request #8 from rghose/patch-1

Wrapping variables in isset() for better set checking