Fix some strict standards PHP notices

Fixes a couple PHP notices that come up when you have strict standards enabled.

I also included a changeset that trims trailing whitespace d87872e, which you can take or leave as you'd like.