Skip to content

[PDO] Return false from rewrite_name_to_position() on IM001 error path - #283

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

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

Conversation

@iliaal

@iliaal iliaal commented Aug 24, 2026

Copy link
Copy Markdown
Owner

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 in dispatch_param_event() never saw the failure. This changes the return to false so the error propagates correctly. Sibling audit found no other -1 return in this function or its call sites.

rewrite_name_to_position() returns bool, so the previous -1 was
converted to true and the caller's failure check at pdo_stmt.c:328
never triggered after raising the IM001 error for a repeated named
parameter. Sibling audit: no other -1 return remains in this function;
the other error paths already return 0.
@iliaal iliaal closed this Aug 24, 2026
@iliaal iliaal reopened this Aug 24, 2026
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