Skip to content

Fix string coercion for $a .= $a#11296

Merged
iluuu1994 merged 1 commit into
php:masterfrom
iluuu1994:fix-string-op-assign-to-self-coercion
May 22, 2023
Merged

Fix string coercion for $a .= $a#11296
iluuu1994 merged 1 commit into
php:masterfrom
iluuu1994:fix-string-op-assign-to-self-coercion

Conversation

@iluuu1994

@iluuu1994 iluuu1994 commented May 22, 2023

Copy link
Copy Markdown
Member

free_op2_string may be set to false when the operands are not strings and result == op1 == op2, by re-using the same string for both operands. In that case, the string should still be copied to result because result is not actually a string. Also change the op1 branch to stay consistent.

Introduced by GH-10049

free_op2_string may be set to false when the operands are not strings, and
`result == op1 == op2`, by re-using the same string for both operands. In that
case, the string should still be copied to result because result is not actually
a string. Also change the op1 branch to stay consistent.

Introduced by phpGH-10049
@iluuu1994
iluuu1994 merged commit 5c74164 into php:master May 22, 2023
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.

2 participants