]> granicus.if.org Git - php/commitdiff
Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
authorStanislav Malyshev <stas@php.net>
Mon, 7 Jul 2014 07:48:44 +0000 (00:48 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 7 Jul 2014 07:48:44 +0000 (00:48 -0700)
NEWS
ext/intl/php_intl.c
ext/intl/tests/bug66921.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 122d7faf25a8f3a05c7b68a6d32f2572283613a3..a1c52b3dfd5393d11bccf72ce683f8461654384e 100644 (file)
--- 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)
index 65e53c8b5e8248dc111d7934d5652c8f7573132f..ff1627a18f4c3a04aa29044494d2327e0a57ea16 100644 (file)
@@ -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 (file)
index 0000000..58ae9c0
--- /dev/null
@@ -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"
+}