1--TEST-- 2IntlCalendar::setLenient(): 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->setLenient()); 16var_dump($c->setLenient(array())); 17var_dump($c->setLenient(1, 2)); 18 19var_dump(intlcal_set_lenient($c, array())); 20var_dump(intlcal_set_lenient(1, false)); 21--EXPECTF-- 22Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 0 given in %s on line %d 23 24Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d 25bool(false) 26 27Warning: IntlCalendar::setLenient() expects parameter 1 to be boolean, array given in %s on line %d 28 29Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d 30bool(false) 31 32Warning: IntlCalendar::setLenient() expects exactly 1 parameter, 2 given in %s on line %d 33 34Warning: IntlCalendar::setLenient(): intlcal_set_lenient: bad arguments in %s on line %d 35bool(false) 36 37Warning: intlcal_set_lenient() expects parameter 2 to be boolean, array given in %s on line %d 38 39Warning: intlcal_set_lenient(): intlcal_set_lenient: bad arguments in %s on line %d 40bool(false) 41 42Fatal error: Uncaught TypeError: Argument 1 passed to intlcal_set_lenient() must be an instance of IntlCalendar, integer given in %s:%d 43Stack trace: 44#0 %s(%d): intlcal_set_lenient(1, false) 45#1 {main} 46 thrown in %s on line %d 47