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

Bug: DB result function incorrect result declaration #8501

Closed
Turecky opened this issue Feb 2, 2024 · 1 comment · Fixed by #8503
Closed

Bug: DB result function incorrect result declaration #8501

Turecky opened this issue Feb 2, 2024 · 1 comment · Fixed by #8503
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@Turecky
Copy link

Turecky commented Feb 2, 2024

PHP Version

8.3

CodeIgniter4 Version

4.4.5

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

cli-server (PHP built-in webserver)

Database

MySQL

What happened?

Database function getCustomRowObject declared return types as @return array|null but must return object as custom class instance

Steps to Reproduce

Definition placed in system/Database/ResultInterface.php

Expected Output

Return type must be an object of custom class instance

Anything else?

No response

@Turecky Turecky added the bug Verified issues on the current code behavior or pull requests that will fix them label Feb 2, 2024
@kenjis
Copy link
Member

kenjis commented Feb 2, 2024

Yes, the return type is an object.
https://codeigniter4.github.io/CodeIgniter4/database/results.html#custom-result-objects

I sent a PR to fix: #8503

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 a pull request may close this issue.

2 participants