|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-12-23 19:11 UTC] felipe@php.net
[2012-12-23 19:11 UTC] felipe@php.net
-Status: Open
+Status: Not a bug
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ When a message formatter formats selects with nested variables, its behaviour is buggy. Test script: --------------- // attempting to translate file size $locale = 'en_US'; $args = array(1.23435, 'M'); $format = "{1, select, k {{0} kB} M {{0} MB} other {{0} B}}"; echo "#1: ". msgfmt_format_message($locale, $format, $args) ."\n"; $format = "{1, select, k {{0} kB} M {{0, number, #.##} MB} other {{0} B}}"; echo "#2: ". msgfmt_format_message($locale, $format, $args) ."\n"; echo "Error? ". intl_get_error_message() ."\n"; Expected result: ---------------- #1: 1.23435 MB #2: 1.23 MB Error? U_ZERO_ERROR Actual result: -------------- #1: 1.23435 MB #2: Error? Creating message formatter failed: U_ARGUMENT_TYPE_MISMATCH