summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--ext/intl/php_intl.c2
-rw-r--r--ext/intl/tests/bug66921.phpt15
3 files changed, 19 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 783eca81e7..a717429605 100644
--- a/NEWS
+++ b/NEWS
@@ -8,11 +8,13 @@ PHP NEWS
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
- Intl:
+ . Fixed bug #66921 (Wrong argument type hint for function
+ intltz_from_date_time_zone). (Stas)
. Fixed bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting).
(Stas)
- pgsql:
- . Fix bug #67555 (Cannot build against libpq 7.3). (Adam)
+ . Fixed bug #67555 (Cannot build against libpq 7.3). (Adam)
- SPL:
. Fixed bug #67539 (ArrayIterator use-after-free due to object change during
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"
+}