php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46746 xmlrpc_decode_request outputs non-suppressable error when given bad data
Submitted: 2008-12-04 00:05 UTC Modified: 2008-12-09 17:22 UTC
From: pickscrape at gmail dot com Assigned:
Status: Closed Package: XMLRPC-EPI related
PHP Version: 5CVS,6CVS (2008-12-08) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 2 = ?
Subscribe to this entry?

 
 [2008-12-04 00:05 UTC] pickscrape at gmail dot com
Description:
------------
When calling xmlrpc_decode_request with invalid XML data, the following error is output to STDERR:

expat reports error code 4
        description: Empty document
        line: 1
        column: 1
        byte index: 0
        total bytes: 0

        data beginning 0 before byte index: dfsdffsd

There seems to be no way to turn it off: I want to be able to handler the error myself, and do not want the error message cluttering the output needlessly.

Reproduce code:
---------------
<?php
x = '';
o = xmlrpc_decode_request('dfsdffsd', $x);
?>


Expected result:
----------------
For there to be some way to turn this error message off, or have it redirected to a variable or accessible via some library call.

Actual result:
--------------
expat reports error code 4
        description: Empty document
        line: 1
        column: 1
        byte index: 0
        total bytes: 0

        data beginning 0 before byte index: dfsdffsd

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-08 11:50 UTC] jani@php.net
ext/xmlrpc/libxmlrpc/xml_element.c:729 has fprintf() which dumps the errors to STDERR. 
 [2008-12-09 17:22 UTC] iliaa@php.net
This bug has been fixed in CVS.

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


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 22:01:29 2024 UTC