Fix PHP notices

Fix some PHP notices...

@joehoyle  #review #merge