As a regression from https://github.com/matomo-org/matomo/pull/18179 cookies with session lifetime don't work anymore.
As stated in the Cookie class an expire of 0
should indicate a session cookie:
https://github.com/matomo-org/matomo/blob/9c666ab8cf4c591ba26cd7d992972ef47d5369a2/core/Cookie.php#L81-L82
But that doesn't work anymore as the lifetime will be always converted to a datetime, resulting in 01-Jan-1970 00:00:00 UTC
, causing the cookie to be never set.
fixes #18819