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

fix: [Model] casting causes TypeError when finding no record #8871

Merged
merged 3 commits into from
May 10, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented May 8, 2024

Description
Supersedes #8807
Fixes #8806

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

kenjis and others added 3 commits May 8, 2024 15:23
Bug: when the query ($this->first()) result returns NULL we get TypeError
Fix TypeError error in the methods: doFind and doFirst when using casts
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label May 8, 2024
@kenjis kenjis merged commit 069e13d into codeigniter4:develop May 10, 2024
40 checks passed
@kenjis kenjis deleted the fix-model-casting-TypeError branch May 10, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: [Model] when the query ($this->first()) result returns NULL we get TypeError
5 participants