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