diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-02 13:38:34 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-03 12:28:32 +0100 |
commit | c2935499b14ee605452016ea00f3c0a94c0a1943 (patch) | |
tree | 7d5a86d2ee0e609ee8a5d91bcd2783aa453f23f7 /ext/xmlwriter/php_xmlwriter.c | |
parent | ef1e4891b47949c8dc0f9482eef9454a0ecdfa1d (diff) | |
download | php-git-c2935499b14ee605452016ea00f3c0a94c0a1943.tar.gz |
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`.
Diffstat (limited to 'ext/xmlwriter/php_xmlwriter.c')
0 files changed, 0 insertions, 0 deletions