Addresses issue in #3066
Addresses issue in #3066

Prevent undefined variable errors and xml issues when `$month` and `$year`
cannot be set.

Signed-off-by: Georald Camposano <cc30d6dfc57e08690da0a839499b8e9354843c71@gmail.com>

StealthWombat/SMF2.1-more-forkery,StealthWombat/SMF2.1-more-forkery,margarett/SMF2.1,margarett/SMF2.1,georaldc/SMF2.1,georaldc/SMF2.1