|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #67648 SoapFault has undocumented properties
Submitted: 2014-07-18 09:16 UTC Modified: -
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: Assigned:
Status: Open Package: SOAP related
PHP Version: Irrelevant 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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
34 + 47 = ?
Subscribe to this entry?

 [2014-07-18 09:16 UTC]
SoapFault may set properties on itself according to values passed in through the constructor. These values are not documented and not part of the class "definition", and when set are publicly accessible.

At the very least the documentation should be updated to reflect the six potential properties.

A step beyond that would be to consider adding getter methods, like Exception classes typically have. The properties could then be kept private, though that would be a bit of a BC break (even if it was undocumented).

See also
- bug #55567 SoapFault is missing methods to get the Fault Code
- bug #67641 SoapFault Traversable ? [has a couple relevant comments]

Test script:
(copied from

try {
    throw new SoapFault('code', 'string', 'actor', 'detail', 'name', 'header');
} catch (Exception $ex) {
    var_dump($ex->faultcode, $ex->faultstring, $ex->faultactor, $ex->detail, $ex->_name, $ex->headerfault);


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 18:03:43 2022 UTC