Skip to content

fix(model): pass $recursive parameter to parent in objectToRawArray#10258

Open
gr8man wants to merge 1 commit into
codeigniter4:developfrom
gr8man:fix/model-recursive
Open

fix(model): pass $recursive parameter to parent in objectToRawArray#10258
gr8man wants to merge 1 commit into
codeigniter4:developfrom
gr8man:fix/model-recursive

Conversation

@gr8man
Copy link
Copy Markdown

@gr8man gr8man commented May 31, 2026

Fix a bug in Model::objectToRawArray() where the $recursive parameter was accepted but never forwarded to BaseModel::objectToRawArray(). The method called parent::objectToRawArray($object, $onlyChanged) without the third argument, causing nested Entity objects to always be returned as objects instead of recursively converting them to arrays when $recursive=true.

Checklist:

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

@mergeable
Copy link
Copy Markdown

mergeable Bot commented May 31, 2026

Hi there, gr8man! 👋

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work
on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

Sincerely, the mergeable bot 🤖

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

Successfully merging this pull request may close these issues.

1 participant