Fixed missing variable php errors.