summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-07-07 00:49:33 -0700
committerStanislav Malyshev <stas@php.net>2014-07-07 00:50:07 -0700
commit04a227dd1610355ce2a86a3bad718c86eed1e6fa (patch)
tree96cc3e8f7ee64f98dd90107a4f1f820dc4ef1486
parenteffb2b7a1312ecf952d6a752c0ce6190f7aede1e (diff)
parent96c9cc315d8dea5b0d2c8b855620e3723d149470 (diff)
downloadphp-git-04a227dd1610355ce2a86a3bad718c86eed1e6fa.tar.gz
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone fix format
-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"
+}