|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51725 xmlrpc_get_type() returns true on invalid dates
Submitted: 2010-05-03 05:40 UTC Modified: 2010-05-12 11:39 UTC
From: Assigned: mike (profile)
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5.3.2 OS: linux/kfreebsd ia64/x86_64
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2010-05-03 05:40 UTC]
ext/xmlrpc/tests/bug42189.phpt fails consistently on 64 bits architectures such as ia64 and x86_64.

I modified the test a bit to show what's going on. From a quick look at the code it appears to be a bug in the XMLRPC-EPI lib and not in the module itself.

Test script:
$a = '~~~~~~~~~~~~~~~~~~';
$ok = xmlrpc_set_type($a, 'datetime');

if ($ok)
    echo xmlrpc_encode($a);

echo "Done\n";

Expected result:

Actual result:
<?xml version="1.0" encoding="utf-8"?>


php_parse_date-return-on-parse-error (last revision 2010-05-12 09:36 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-03 14:20 UTC]
I cannot reproduce it on Linux using:
libexpat1-dev  --- 2.0.1-4+lenny3
libxml2-dev    --- 2.7.3.dfsg-2.1
 [2010-05-03 14:23 UTC]
(I tested on 32bit though)
 [2010-05-03 15:32 UTC]
-Status: Open +Status: Verified
 [2010-05-03 15:32 UTC]
IT happens on 64bit systems only. The reason has to do with date extension, which 
is used to validate the date string (on 64 bit machines this results in a very 
small negative #), not -1 and thus passed validation.
 [2010-05-12 11:11 UTC]
The following patch has been added/updated:

Patch Name: php_parse_date-return-on-parse-error
Revision:   1273655513
 [2010-05-12 11:36 UTC]
The following patch has been added/updated:

Patch Name: php_parse_date-return-on-parse-error
Revision:   1273656982
 [2010-05-12 11:37 UTC]
Automatic comment from SVN on behalf of mike
Log: Fixed bug #51725 (xmlrpc_get_type() returns true on invalid dates). (Mike)
 [2010-05-12 11:39 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: mike
 [2010-05-12 11:39 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 16:05:54 2022 UTC