Below is a link to a copy of my archivecalendar.php file. After saving it, you'll need to rename it to archivecalendar.php.
Rename your existing archivecalendar.php to archivecalendar-old.php, then upload this version to your addons folder.
See if this solves your problem.
You can see my version in action here