You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fatal error on PHP 8: CEvent::getRecurrentEventforPeriod() called statically #530
Viewing the calendar crashes on PHP 8 as soon as a recurring event is included in the result.
CEvent::getEventsForPeriod() is static and calls self::getRecurrentEventforPeriod(), but that method isn't declared static. PHP 8 treats this as a fatal error.
Environment
web2project 5.0.0-rc2, upgraded from 2.3.1 (the code is unchanged in master as of 2026-10-31)
PHP 8.3.36, MySQL 8.4.13
Steps to reproduce
Have an event with event_recurs > 0 that the event filter doesn't exclude. We saw this with an empty filter value, which uses the same query branch as the default all.
Open a page that calls CEvent::getEventsForPeriod(). For us this was the first page after login, because our default view is the day view.
Actual result
HTTP 500:
PHP Fatal error: Uncaught Error: Non-static method CEvent::getRecurrentEventforPeriod() cannot be called statically in modules/events/events.class.php:294
#0 includes/cleanup_functions.php(3396): CEvent::getEventsForPeriod(Object(w2p_Utilities_Date), Object(w2p_Utilities_Date), '')
Expected result
The page renders with the recurring events included.
Suggested fix
The method doesn't use $this, so it can be declared static (modules/events/events.class.php, line 124):
The calls are at lines 283, 288 and 294. With this one-word change, the day, week and month views returned HTTP 200 with no fatal errors on our copy, including the dates of our
recurring events.
Thanks for the thorough report, and for the fix suggestion. It’s exactly right.
This was fixed in 4b4ff99a36edc9a3736c89a1222b2a29acffc4b6 on the dev-5.0.0 branch, a few days before your report: getRecurrentEventforPeriod() is now declared public static, matching your suggested fix. The fix will reach master with the next merge from dev-5.0.0, and it will be included in the next 5.0.0 release candidate.
Until then, you can either apply the one-word change from your report or cherry-pick 4b4ff99 onto rc2.
I’ll close this once it lands in master. If you see anything else on PHP 8.3, please open another issue.
Activity
caseysoftware commentedon Nov 2, 2026
Thanks for the thorough report, and for the fix suggestion. It’s exactly right.
This was fixed in 4b4ff99a36edc9a3736c89a1222b2a29acffc4b6 on the dev-5.0.0 branch, a few days before your report: getRecurrentEventforPeriod() is now declared public static, matching your suggested fix. The fix will reach master with the next merge from dev-5.0.0, and it will be included in the next 5.0.0 release candidate.
Until then, you can either apply the one-word change from your report or cherry-pick 4b4ff99 onto rc2.
I’ll close this once it lands in master. If you see anything else on PHP 8.3, please open another issue.