Skip to content

Fix GH-22683: Reflection(Class)Constant::__toString() should not warn on NAN conversions#22694

Open
khaledalam wants to merge 2 commits into
php:masterfrom
khaledalam:fix-gh22683-reflection-nan-warning
Open

Fix GH-22683: Reflection(Class)Constant::__toString() should not warn on NAN conversions#22694
khaledalam wants to merge 2 commits into
php:masterfrom
khaledalam:fix-gh22683-reflection-nan-warning

Conversation

@khaledalam

@khaledalam khaledalam commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Fixes GH-22683.

Add an IS_DOUBLE branch that formats the value with smart_str_append_double() instead.

image

@DanielEScherzer DanielEScherzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the implementation looks good, but can you please

  • retarget this PR so that it is for PHP 8.5
  • in the tests, the error handler can be removed, since warnings will show up in the output and then can be seen in the failure comparison, no need for the custom "Unexpected warning" messages

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.

Reflection(Class)Constant::__toString() should not warn on NAN conversions

2 participants