Annotation of embedaddon/php/ext/intl/tests/bug62017.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62017: datefmt_create with incorrectly encoded timezone leaks pattern
! 3: --SKIPIF--
! 4: <?php
! 5: if (!extension_loaded('intl'))
! 6: die('skip intl extension not enabled');
! 7: --FILE--
! 8: <?php
! 9: ini_set('intl.error_level', E_WARNING);
! 10: var_dump(
! 11: datefmt_create('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "\xFF",
! 12: IntlDateFormatter::GREGORIAN, 'a'));
! 13: var_dump(
! 14: new IntlDateFormatter('', IntlDateFormatter::NONE, IntlDateFormatter::NONE, "Europe/Lisbon",
! 15: IntlDateFormatter::GREGORIAN, "\x80"));
! 16: --EXPECTF--
! 17: Warning: datefmt_create(): datefmt_create: error converting timezone_str to UTF-16 in %s on line %d
! 18: NULL
! 19:
! 20: Warning: IntlDateFormatter::__construct(): datefmt_create: error converting pattern to UTF-16 in %s on line %d
! 21: NULL
! 22:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>