summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-07-07 00:48:44 -0700
committerStanislav Malyshev <stas@php.net>2014-07-07 00:48:44 -0700
commit8ba240a70b22f50483818cc0302fd264b1a22fc9 (patch)
tree1d220e92924f43c67fcc0ac8f4079cd7ddd4201a
parent8ddf9a2dc4f526821b794cc0b6f537d2cc013d27 (diff)
downloadphp-git-8ba240a70b22f50483818cc0302fd264b1a22fc9.tar.gz
Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
-rw-r--r--NEWS6
-rw-r--r--ext/intl/php_intl.c2
-rw-r--r--ext/intl/tests/bug66921.phpt15
3 files changed, 20 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 122d7faf25..a1c52b3dfd 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ PHP NEWS
. Fixed bug #67531 (syslog cannot be set in pool configuration). (Remi)
- 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)
@@ -29,7 +31,7 @@ PHP NEWS
happen) (Dmitry, Laruence)
- pgsql:
- . Fix bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
+ . Fixed bug #67550 (Error in code "form" instead of "from", pgsql.c, line 756),
which affected builds against libpq < 7.3. (Adam)
- SPL:
@@ -40,7 +42,7 @@ PHP NEWS
- Streams:
. Fixed bug #67430 (http:// wrapper doesn't follow 308 redirects). (Adam)
-?? ??? 2014, PHP 5.5.14
+27 Jun 2014, PHP 5.5.14
- Core:
. Fixed BC break introduced by patch for bug #67072. (Anatol, Stas)
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"
+}