Clean up php notices

As it is written, this library emits a bunch of php notices when php is
running at higher error reporting levels.  This update cleans up those
warnings.