Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only fetch modes declared on Doctrine\DBAL\FetchMode are supported by legacy API #12

Open
seibtph opened this issue Oct 7, 2022 · 5 comments

Comments

@seibtph
Copy link

seibtph commented Oct 7, 2022

When I click on the link in the email I get the following error message. Do you have any idea how I can solve this? I have done the configuration as described.

request.CRITICAL: Uncaught PHP Exception LogicException: "Only fetch modes declared on Doctrine\DBAL\FetchMode are supported by legacy API." at /www/htdocs/xxxxxx/develop/xxxxxx/vendor/doctrine/dbal/src/Result.php line 288 {"exception":"[object] (LogicException(code: 0): Only fetch modes declared on Doctrine\\DBAL\\FetchMode are supported by legacy API. at /www/htdocs/xxxxxx/develop/xxxxxx/vendor/doctrine/dbal/src/Result.php:288)"} []

Contao 4.13.10
PHP 8.0.20
Token Login 1.3.4

@piotrwarsztocki
Copy link

I have this problem too. Any sollutions?

Contao 4.13.14
PHP 8.1.12
Token Login 1.3.4

@piotrwarsztocki
Copy link

Ok. I've just found quick but not very elegant solution
At Module/TokenLogin.php i changed line 72
$result = $statement->fetch(\PDO::FETCH_OBJ);
to
$result = $statement->fetchAssociative(\PDO::FETCH_OBJ);
$result = (object) $result;

@rustykowski
Copy link

@piotrwarsztocki
which file is it exactly?
I could not find the specified code.

@richardhj
Could you have a look at the Contao 4.13 compatibility?

@piotrwarsztocki
Copy link

@rustykowski
Previously it was in src/Controller/TokenLogin.php in line 72 but it has already been corrected (now line 71)

@rustykowski
Copy link

Great! The new version is not tagged yet.
I had to require the dev-main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants