Changeset 21304 for branches/version-2_11-dev/data/module/SOAP/Fault.php
- Timestamp:
- 2011/10/31 13:54:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/module/SOAP/Fault.php
r21299 r21304 24 24 */ 25 25 26 /** PEAR_Error */27 26 require_once 'PEAR.php'; 28 27 … … 30 29 * PEAR::Error wrapper used to match SOAP Faults to PEAR Errors 31 30 * 32 * SOAP_Fault can provide a complete backtrace of the error. Revealing these33 * details in a public web services is a bad idea because it can be used by34 * attackers. Thus you have to enable backtrace information in SOAP_Fault35 * responses by putting the following code in your script after your36 * "require_once 'SOAP/Server.php';" line:31 * SOAP_Fault transmissions normally contain a complete backtrace of the 32 * error. Revealing these details in a public web services is a bad idea 33 * because it can be used by attackers. Backtrace information can be kept out 34 * of SOAP_Fault responses by putting the following code in your script after 35 * your "require_once 'SOAP/Server.php';" line: 37 36 * 38 37 * <code> 39 * $ backtrace =& PEAR::getStaticProperty('SOAP_Fault', 'backtrace');40 * $ backtrace = true;38 * $skiptrace =& PEAR::getStaticProperty('PEAR_Error', 'skiptrace'); 39 * $skiptrace = true; 41 40 * </code> 42 41 * … … 77 76 $msg = new SOAP_Base(); 78 77 $params = array(); 79 $params[] = new SOAP_Value('faultcode', 'QName', SOAP_BASE::SOAPENVPrefix().':' . $this->code);78 $params[] = new SOAP_Value('faultcode', 'QName', 'SOAP-ENV:' . $this->code); 80 79 $params[] = new SOAP_Value('faultstring', 'string', $this->message); 81 80 $params[] = new SOAP_Value('faultactor', 'anyURI', $this->error_message_prefix); 82 if (PEAR::getStaticProperty('SOAP_Fault', 'backtrace') && 83 isset($this->backtrace)) { 81 if (isset($this->backtrace)) { 84 82 $params[] = new SOAP_Value('detail', 'string', $this->backtrace); 85 83 } else {
Note: See TracChangeset
for help on using the changeset viewer.