1--TEST--
2IntlTimeZone::getCanonicalID(): errors
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);
10
11var_dump(IntlTimeZone::getCanonicalID());
12var_dump(IntlTimeZone::getCanonicalID(array()));
13var_dump(IntlTimeZone::getCanonicalID("foo\x81"));
14var_dump(IntlTimeZone::getCanonicalID('foobar', null));
15
16
17--EXPECTF--
18
19Warning: IntlTimeZone::getCanonicalID() expects at least 1 parameter, 0 given in %s on line %d
20
21Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
22bool(false)
23
24Warning: IntlTimeZone::getCanonicalID() expects parameter 1 to be string, array given in %s on line %d
25
26Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: bad arguments in %s on line %d
27bool(false)
28
29Warning: IntlTimeZone::getCanonicalID(): intltz_get_canonical_id: could not convert time zone id to UTF-16 in %s on line %d
30bool(false)
31
32Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in %s:%d
33Stack trace:
34#0 {main}
35  thrown in %s on line %d
36