mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Return value of Doctrine\ORM\Query::getFirstResult() must be of the type int or null, string returned #6848
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @knallcharge on GitHub (Oct 5, 2021).
Bug Report
Calling getFirstResult() results in an error:
Return value of Doctrine\ORM\Query::getFirstResult() must be of the type int or null, string returned
Summary
After updating from 2.9.6 to 2.10.0 I'm getting this error, reverting back to 2.9.6 resolves this.
Current behavior
The above error is shown.
How to reproduce
Can't really build a stub to reproduce, the error is a result of a query by sg/datatablesbundle, it calls getIterator() in the Paginator which calls getFirstResult().
Expected behavior
Not seeing an error as with version 2.9.6, maybe related to #9086?
@derrabus commented on GitHub (Oct 5, 2021):
Yes, the issues seems related and I would expect that a similar fix would help. Up for a PR?
@knallcharge commented on GitHub (Oct 5, 2021):
see #9090
@derrabus commented on GitHub (Oct 5, 2021):
Awesome, thanks!