|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59107 Date read from amf as double not int64
Submitted: 2010-03-10 10:53 UTC Modified: 2017-04-01 19:22 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ssufficool at gmail dot com Assigned:
Status: Wont fix Package: amfext (PECL)
PHP Version: Irrelevant OS: Ubuntu Linux 9.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ssufficool at gmail dot com
New email:
PHP Version: OS:


 [2010-03-10 10:53 UTC] ssufficool at gmail dot com
teh serialized date is read from an AMF stream as a double and then re-ordered as big endian instead of being read as an int64 per the spec. The double is unusable in PHP as a date anyhow.

Reproduce code:
$amf = amf_decode($amfstream);
echo $amf['date'];

Expected result:
An integer or double value that is usable in PHP

Actual result:

--- SOLUTION?  ---
For PHP5.x read the int64, convert from milliseconds to seconds and return as ZVAL_LONG with a big fat note of the precision loss.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:22 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 19:22 UTC]
Due to this extension not seeing any activity since 2010, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jan 21 19:01:27 2021 UTC