Repository navigation
Default untyped bind parameters to string and tidy Statement::__clone() - #84
Merged
Merged
Conversation
bindParametersFromContainer() only added a type character for parameters with errata, so untyped parameters produced an empty or short types string and bind_param() failed. Untyped parameters now bind as 's' again. __clone() gains a void return type and the TODO is dropped: the mysqli Statement never had a __clone() in this repository, only the PDO Statement did before it moved to phpdb core. Fixes #83 (cherry picked from commit 588e5d6)
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picks
588e5d6onto0.5.x.Why
PR #78 ("Fix argument count error") was based on
mago-format-reformat, not0.5.x. That branch had already been merged into0.5.xvia #57 on 2026-08-31 — five weeks before #78 landed on it on 2026-10-07. So #78's merge commit (2f6aeb5) is not an ancestor of0.5.xand the fix never reached the default branch, while issue #83 was closed and placed on milestone0.5.0.Net effect: #83 was recorded as fixed in
0.5.0but the bug was still live on0.5.x. A check of all 33 merged PRs confirms #78 is the only one whose commits are not on0.5.x(#58 and #60 landed correctly via #57).What
bindParametersFromContainer()only appended a type character for parameters carrying errata, so untyped parameters produced an empty or short types string andbind_param()failed. Untyped parameters now bind ass.__clone()is restored to the mysqliStatement—0.5.xcurrently has no__clone()at all, so a cloned statement shared itsParameterContainer. It now deep-clones the container, resetsisPrepared, and gains avoidreturn type.Testing
phpunit --testsuite "unit test"— 193 tests, 385 assertions, OK.origin/0.5.x'sStatement.phpand fail there, so they genuinely cover the fix.mago format --check,mago lintandmago analyzeare all clean (121 baselined issues filtered, no new findings).test/integration/Mysqli/StatementResultTest.phpneeds a live MySQL, so it is left to CI.Cherry-picked from
588e5d6e06cc1874d806fb008520cd0b034b0455; the resulting tree is byte-identical to that commit. The only conflict was the absent__clone().Closes #83