mirror of
https://github.com/php/php-src.git
synced 2026-03-30 04:02:19 +02:00
To avoid duplicate type checks. In debug builds arginfo is still checked and will generate an assertions if the function doesn't subsequently throw an exception. Some test results change due to differences in zpp and arginfo error messages.
20 lines
495 B
PHP
20 lines
495 B
PHP
--TEST--
|
|
IntlCalendar::getErrorCode(): bad arguments
|
|
--INI--
|
|
date.timezone=Atlantic/Azores
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
ini_set("intl.error_level", E_WARNING);
|
|
|
|
var_dump(intlcal_get_error_code(null));
|
|
--EXPECTF--
|
|
Fatal error: Uncaught TypeError: intlcal_get_error_code() expects parameter 1 to be IntlCalendar, null given in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): intlcal_get_error_code(NULL)
|
|
#1 {main}
|
|
thrown in %s on line %d
|