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

Fatal error when returning empty resultset from database #13763

Closed
byfareska opened this issue Jan 13, 2019 · 3 comments
Closed

Fatal error when returning empty resultset from database #13763

byfareska opened this issue Jan 13, 2019 · 3 comments

Comments

@byfareska
Copy link

byfareska commented Jan 13, 2019

[Sun Jan 13 15:09:50 2019] PHP Fatal error: Uncaught TypeError: Return value of App\Entity\User::findFirst() must implement interface Phalcon\Mvc\ModelInterface, boolean returned in /home/eska/PhpstormProjects/obrazy/src/Entity/User.php:122

I'm getting this, because it returns false. Maybe change it to null?

@niden
Copy link
Member

niden commented Feb 2, 2019

Can you provide more information please? Phalcon version, sample code etc.

Thank you

@sergeyklay
Copy link
Contributor

I'm closing this issue due to the lack of any reaction. I'll open it again if the need arises

@SmartyGunjan
Copy link

SmartyGunjan commented Nov 12, 2020

Phalcon 4.1
PHP 7.4
nginx centos 8
Please let me know as I am getting the same error.
Fatal error: Uncaught TypeError: Return value of TransactionDetail::findFirst() must implement interface Phalcon\Mvc\ModelInterface, null returned in /usr/share/nginx/html/luminous_api/models/TransactionDetail.php:152

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

4 participants