fix PHP notice when saving event