The attached file will fix it. Replace calendar.php in kiwtrees root folder.
The bug has been there since January, amazingly enough. But it is only triggered by certain types of date (i.e. those with “BEF” or similar adjusters from my quick testing) and when they are found on a visit to the calendar page using the “year” option. (Main menu > Calendar > Year).
Did you view it sometime since upgrading?
Just goes to show how many parts of kiwitrees never get visited.