diff options
-rw-r--r-- | ext/intl/php_intl.c | 2 | ||||
-rw-r--r-- | ext/intl/tests/bug66921.phpt | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/ext/intl/php_intl.c b/ext/intl/php_intl.c index 65e53c8b5e..ff1627a18f 100644 --- a/ext/intl/php_intl.c +++ b/ext/intl/php_intl.c @@ -445,7 +445,7 @@ ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_idarg_static, 0, 0, 1 ) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_from_date_time_zone, 0, 0, 1 ) - ZEND_ARG_OBJ_INFO( 0, dateTimeZone, IntlDateTimeZone, 0 ) + ZEND_ARG_OBJ_INFO( 0, dateTimeZone, DateTimeZone, 0 ) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX( arginfo_tz_create_enumeration, 0, 0, 0 ) diff --git a/ext/intl/tests/bug66921.phpt b/ext/intl/tests/bug66921.phpt new file mode 100644 index 0000000000..58ae9c0f82 --- /dev/null +++ b/ext/intl/tests/bug66921.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +--FILE-- +<?php +$f = new ReflectionFunction('intltz_from_date_time_zone'); +var_dump($f->getParameters()[0]->getClass()); + +?> +--EXPECTF-- +object(ReflectionClass)#%d (1) { + ["name"]=> + string(12) "DateTimeZone" +} |