com php-src: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone: NEWS ext/intl/php_i ntl.c ext/intl/tests/bug66921.phpt
| From: | Stanislav Malyshev | Date: | Mon, 07 Jul 2014 07:48:44 +0000 |
| Subject: | com php-src: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone: NEWS ext/intl/php_i ntl.c ext/intl/tests/bug66921.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79260@lists.php.net to get a copy of this message | ||
Commit: 8ba240a70b22f50483818cc0302fd264b1a22fc9
Author: Stanislav Malyshev <stas@php.net> Mon, 7 Jul 2014 00:48:44 -0700
Parents: 8ddf9a2dc4f526821b794cc0b6f537d2cc013d27
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log:
Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
Bugs:
https://bugs.php.net/66921
Changed paths:
M NEWS
M ext/intl/php_intl.c
A ext/intl/tests/bug66921.phpt
Diff:
diff --git a/NEWS b/NEWS
index 122d7fa..a1c52b3 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 65e53c8..ff1627a 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 0000000..58ae9c0
--- /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"
+}