1--TEST--
2IntlCalendar::getErrorCode(): bad arguments
3--INI--
4date.timezone=Atlantic/Azores
5--SKIPIF--
6<?php
7if (!extension_loaded('intl'))
8	die('skip intl extension not enabled');
9--FILE--
10<?php
11ini_set("intl.error_level", E_WARNING);
12
13$c = new IntlGregorianCalendar(NULL, 'pt_PT');
14
15var_dump($c->getErrorCode(array()));
16
17var_dump(intlcal_get_error_code(null));
18--EXPECTF--
19Warning: IntlCalendar::getErrorCode() expects exactly 0 parameters, 1 given in %s on line %d
20
21Warning: IntlCalendar::getErrorCode(): intlcal_get_error_code: bad arguments in %s on line %d
22bool(false)
23
24Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_code() must be an instance of IntlCalendar, null given in %s:%d
25Stack trace:
26#0 %s(%d): intlcal_get_error_code(NULL)
27#1 {main}
28  thrown in %s on line %d
29