Fixed php warnings for undefined vars.