zikula/core

ZAuthModule/Entity/Repository/UserVerificationRepository.php (line 64)

Closed this issue · 0 comments

Q A
Zikula Version 3.0.3
PHP Version 7.3.5

Expected Behavior

Not throw an error

Current Behavior

It throws the following error:
Failed to start the session because headers have already been sent by "/home/paust1/public_html/sixthedition/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Response.php" at line 381.

And
zauth-module/Entity/Repository/UserVerificationRepository.php (line 64)
DateTime::__construct() expects parameter 1 to be string, null given

Fixing the second error fixes the first

Possible Solution

Line 64 of UserVerificationRepostitory is:

$staleRecordUTC = new DateTime(null, new DateTimeZone('UTC'));
10:48
It should be:
$staleRecordUTC = new DateTime("now", new DateTimeZone('UTC'));

Steps to Reproduce

I found this bug after an install of 3.0.3