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


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 );


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.

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

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

Fixed in trunk

Changing issues in preparation for the 1.7.0 release.