Skip to content

Return false from rewrite_name_to_position() on IM001 error path - #23465

Open
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/pdo-rewrite-name-im001-84
Open

Return false from rewrite_name_to_position() on IM001 error path#23465
iliaal wants to merge 1 commit into
php:PHP-8.4from
iliaal:fix/pdo-rewrite-name-im001-84

Conversation

@iliaal

@iliaal iliaal commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

rewrite_name_to_position() is declared bool, so the -1 returned after raising the IM001 error for a repeated :named parameter was converted to true and the caller's failure check never saw the failure, leaving bindParam() and bindColumn() reporting success despite the error. Returning false makes the error propagate; no other -1 return remains in the function.

rewrite_name_to_position() returns bool, so the previous -1 was
converted to true and the caller's failure check never triggered after
raising the IM001 error for a repeated named parameter, leaving
bindParam()/bindColumn() reporting success. Sibling audit: no other -1
return remains in this function; the other error paths already return 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant