|  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
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:


 [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 16:05:57 2022 UTC