php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66921 Wrong argument type hint for function intltz_from_date_time_zone
Submitted: 2014-03-18 10:43 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: johnhax at gmail dot com Assigned:
Status: Closed Package: intl (PECL)
PHP Version: 5.5.10 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: johnhax at gmail dot com
New email:
PHP Version: OS:

 

 [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 commitsRelated reports
 [2014-07-07 07:50 UTC] stas@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
 [2014-07-07 07:50 UTC] stas@php.net
-Status: Open +Status: Closed
 [2014-07-07 15:21 UTC] dmitry@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
 [2014-07-21 09:31 UTC] ab@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
 [2014-07-21 10:02 UTC] ab@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
 [2014-07-30 09:52 UTC] tyrael@php.net
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8ba240a70b22f50483818cc0302fd264b1a22fc9
Log: Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC