Clean up php notices.

There were a few notices that showed up when I ran this from the cli.
My error reporting is (PHP 5.4.6-1ubuntu1.2):
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Merge pull request #1 from trevormorse/clean_up_notices

Clean up php notices.