Prevent PHP warnings

Edit with both changes, and braces, as requested.

Apologies for my limited understanding of Git + Github.