ZF-5565: Zend_Soap_Server - method handle() - only returns null by an non user error (error handling -> E_USER_ERROR)

Description

Zend_Soap_Server line 730 (SVN):

set_error_handler(array($this, 'handlePhpErrors'), E_USER_ERROR);

Change "E_USER_ERROR" to "E_ALL" so that I will be able to throw an SoapFault when a server error occures. So I will be able to overwrite the function "handlePhpErrors" in my Class "Ms_Soap_Server" which extends "Zend_Soap_Server".

With these changes it will be possible to return a SoapFault with a message like "sorry, internal server error" when an error occures in a function of a service class (database connection error).

Otherwise it is impossible to register my own error-handler, because Zend_Soap_Server registers an error-handler on line 730 (SVN). set_error_handler(array($this, 'handlePhpErrors'), E_USER_ERROR);

Comments

the problem why we cannot set this to E_ALL is the following: The errors would by default be thrown to the userland code, which for SOAP Servers is a potential security leak.

What i am going to do is the following, i'll refactor the registering of the fault handler and move it into a protected method which can be overwritten more easily than the handle() function.

Added new protected method _initializeSoapErrorContext() that can be overwritten by userland code.