Clean up php notices.

Hi,

Nothing serious here, just some cleanup :-)

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