Fixes issue with event module week view which crashed the page
(cherry picked from commit b8489c0)