1--TEST--
2IntlCalendar::getErrorMessage(): 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->getErrorMessage(array()));
16
17var_dump(intlcal_get_error_message(null));
18--EXPECTF--
19Warning: IntlCalendar::getErrorMessage() expects exactly 0 parameters, 1 given in %s on line %d
20
21Warning: IntlCalendar::getErrorMessage(): intlcal_get_error_message: bad arguments in %s on line %d
22bool(false)
23
24Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_get_error_message() must be an instance of IntlCalendar, null given in %s:%d
25Stack trace:
26#0 %s(%d): intlcal_get_error_message(NULL)
27#1 {main}
28  thrown in %s on line %d
29