Wrong argument type hint for function intltz_from_date_time_zone
| Bug #66921 | Wrong argument type hint for function intltz_from_date_time_zone | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2014-03-18 10:43 UTC | Modified: | - |
|
||||||||||
| From: | johnhax at gmail dot com | Assigned: | ||||||||||||
| Status: | Closed | Package: | intl (PECL) | |||||||||||
| PHP Version: | 5.5.10 | OS: | ||||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2014-03-18 10:43 UTC] johnhax at gmail dot com
Description:
------------
The argument type hint of function intltz_from_date_time_zone is wrong.
php_intl.c line 448
ZEND_ARG_OBJ_INFO( 0, dateTimeZone, IntlDateTimeZone, 0 )
IntlDateTimeZone should be DateTimeZone
Test script:
---------------
<?php
$f = new ReflectionFunction('intltz_from_date_time_zone');
var_dump($f->getParameters()[0]->getClass());
Expected result:
----------------
class ReflectionClass#2 (1) {
public $name =>
string(12) "DateTimeZone"
}
Actual result:
--------------
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class IntlDateTimeZone does not exist'
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2014-07-07 07:50 UTC] stas@php.net
-Status: Open +Status: Closed