|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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: Tue Jan 19 06:01:23 2021 UTC