Don't know exactly where to report this but i think it maybe a problem with the helper code generate.
When i need to do a request for a register in database if i use the first() method with a model, be it directly or adding where clauses first, the var who is holding the response would indicate that the value is the model, but it should be Model|null (i notice it because php hammer give a warning about is_null being unnecessary here), a simple example would be:
Bug description
Don't know exactly where to report this but i think it maybe a problem with the helper code generate.
When i need to do a request for a register in database if i use the
first()
method with a model, be it directly or adding where clauses first, the var who is holding the response would indicate that the value is the model, but it should be Model|null (i notice it because php hammer give a warning about is_null being unnecessary here), a simple example would be:Now, funny enough, if i add query() before the first() then it works as intended, the var appears as User|null.
Plugin version
8.4.0.242
Operating system
Windows
Steps to reproduce
Use the first method with any model $user = User::first();
Relevant log output
No response