ID: 50808 Updated by: [email protected] Reported By: bschussek at gmail dot com -Status: Open +Status: Assigned Bug Type: I18N and L10N related Operating System: * PHP Version: 5.3, 6 Assigned To: stas
Previous Comments: ------------------------------------------------------------------------ [2010-01-22 00:48:51] bschussek at gmail dot com The reproduce code still produces the wrong output for me with this build. ------------------------------------------------------------------------ [2010-01-21 18:09:30] [email protected] Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ build fixed ------------------------------------------------------------------------ [2010-01-21 12:07:42] [email protected] Stas, no compile here either. ------------------------------------------------------------------------ [2010-01-21 10:35:31] bschussek at gmail dot com The build of your snapshot doesn't work for me. Did I do anything wrong? /bin/sh /home/.../php-5.3-latest/libtool --silent --preserve-dup-deps --mode=compile /home/.../php-5.3-latest/meta_ccld -I/usr/include -Iext/intl/ -I/home/.../php-5.3-latest/ext/intl/ -DPHP_ATOM_INC -I/home/.../php-5.3-latest/include -I/home/.../php-5.3-latest/main -I/home/.../php-5.3-latest -I/home/.../php-5.3-latest/ext/date/lib -I/home/.../php-5.3-latest/ext/ereg/regex -I/usr/include/libxml2 -I/usr/include/mysql -I/home/.../php-5.3-latest/ext/sqlite3/libsqlite -I/home/.../php-5.3-latest/TSRM -I/home/.../php-5.3-latest/Zend -D_REENTRANT -DTHREAD=1 -I/usr/include -g -O2 -fvisibility=hidden -pthread -DZTS -prefer-non-pic -c /home/.../php-5.3-latest/ext/intl/resourcebundle/resourcebundle_class.c -o ext/intl/resourcebundle/resourcebundle_class.lo /home/.../php-5.3-latest/ext/intl/resourcebundle/resourcebundle_class.c: In function resourcebundle_ctor: /home/.../php-5.3-latest/ext/intl/resourcebundle/resourcebundle_class.c:90: error: too few arguments to function zend_object_store_get_object /home/.../php-5.3-latest/ext/intl/resourcebundle/resourcebundle_class.c: In function resourcebundle_array_count: /home/.../php-5.3-latest/ext/intl/resourcebundle/resourcebundle_class.c:250: error: too few arguments to function zend_object_store_get_object make: *** [ext/intl/resourcebundle/resourcebundle_class.lo] Fehler 1 ------------------------------------------------------------------------ [2010-01-20 19:47:55] bschussek at gmail dot com Description: ------------ When a message formatter formats choices with nested variables, its behaviour is buggy. Interestingly, the code below works if you insert the parameter "{1}" once more outside of the choice: 'There are {0,choice,0#are no {1} files|1#is one {1} file} ok {1}' produces There are are no text files ok text There are is one image file ok image Reproduce code: --------------- $fmt = MessageFormatter::create('en_GB', 'There are {0,choice,0#are no {1} files|1#is one {1} file} ok'); echo $fmt->format(array(0, "text")), "\n"; echo $fmt->format(array(1, "image")), "\n"; Expected result: ---------------- There are are no text files ok There are is one image file ok Actual result: -------------- There are are no {1} files ok There are is one {1} file ok ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50808&edit=1
