History log of /PHP-7.3/ext/intl/tests/bug79212.phpt (Results 1 – 2 of 2)
Revision Date Author Comments
# b93e4aa1 03-Feb-2020 Christoph M. Becker

Relax test expectation

Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it

Relax test expectation

Since we're dealing with floating point numbers, precision issues may
hit us, and actually it's not necessary to check for the exact number
anyway, because it is not exact in the first place. Therefore, we
relax the test expectations.

show more ...


# c2935499 02-Feb-2020 Christoph M. Becker

Fix #79212: NumberFormatter::format() may detect wrong type

We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We

Fix #79212: NumberFormatter::format() may detect wrong type

We have to convert to number *before* detecting the type, to cater to
internal objects implementing `cast_object`.

We also get rid of the fallback behavior of using `FORMAT_TYPE_INT32`,
because that can no longer happen; after `convert_scalar_to_number_ex`
the type is either `IS_LONG` or `IS_DOUBLE`. We cater explicitly to
the `IS_ARRAY` case what also avoids triggering a type confusion when
`::TYPE_INT64` is passed as `$type`.

show more ...