-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Phalcon model interface doens't allow false return #13947
Labels
Comments
ruudboon
changed the title
Return value of App\Models\Users::findFirst() must implement interface Phalcon\Mvc\ModelInterface, null returned
Phalcon model interface doens't allow null return
Apr 5, 2019
ruudboon
changed the title
Phalcon model interface doens't allow null return
Phalcon model interface doens't allow false return
Apr 5, 2019
return null or an instance of Phalcon\Mvc\ModelInterface |
@talal424 Interface doesn't allow null. |
Fastest bug fix ever! Thnx @niden |
niden
added a commit
that referenced
this issue
Apr 6, 2019
niden
added a commit
that referenced
this issue
Apr 6, 2019
niden
added a commit
that referenced
this issue
Apr 6, 2019
niden
added a commit
that referenced
this issue
Apr 6, 2019
niden
added a commit
that referenced
this issue
May 9, 2019
phalcon 4.1 php 7.4 getting the same error. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I overload the findFirst and run a query that doesn't match I get the following error:
fatal error: Uncaught TypeError: Return value of MyModel::findFirst() must implement interface Phalcon\Mvc\ModelInterface, bool returned in xxxxx on line xx
Looks like the findFirst can return false but isn't allowed by the interface. Unsure why this only show when overloading the method.
The text was updated successfully, but these errors were encountered: