Zend Framework

Wrong call for new SoapFault in Zend_Soap_Server::fault() breaks SOAP exception handling

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.0RC1, 1.5.0RC2, 1.5.0RC3, 1.5.0, 1.5.0PL1, 1.5.1, 1.5.2, 1.6.0RC1, 1.5.3, 1.6.0RC2, 1.6.0RC3, 1.6.0, 1.6.1, Next Major Release
  • Fix Version/s: 1.7.0
  • Component/s: Zend_Soap_Server
  • Labels:
    None

Description

SoapFault expects the code parameter being a string instead of an integer.
If code is an integer, the SoapException reports an internal server error instead of the correct one.

The correct call has to be:

return new SoapFault( (string) $code, message );

Activity

Hide
T.Lechat added a comment -

You're correct, line 799 of server.php needs to have (string) to works correctly. Now I can register Exception and use it in the handled class. Thanks.

Show
T.Lechat added a comment - You're correct, line 799 of server.php needs to have (string) to works correctly. Now I can register Exception and use it in the handled class. Thanks.
Hide
Andy Thompson added a comment -

Shouldn't this be considered high priority? It effectively breaks exception handling, as Exception->getCode() is always is an integer.

Show
Andy Thompson added a comment - Shouldn't this be considered high priority? It effectively breaks exception handling, as Exception->getCode() is always is an integer.
Hide
Patrick Schulz added a comment -

This is the patch. I'm not sure if it is the correct format. Please give feedback.

Show
Patrick Schulz added a comment - This is the patch. I'm not sure if it is the correct format. Please give feedback.
Hide
Benjamin Eberlei added a comment -

Fixed in trunk

Show
Benjamin Eberlei added a comment - Fixed in trunk
Hide
Wil Sinclair added a comment -

Changing issues in preparation for the 1.7.0 release.

Show
Wil Sinclair added a comment - Changing issues in preparation for the 1.7.0 release.

People

Vote (3)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: