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