Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Unable to influence \SoapFault::$code from Zend\Soap\Server::fault() #6770

Closed
DannyvdSluijs opened this issue Oct 15, 2014 · 4 comments
Closed

Comments

@DannyvdSluijs
Copy link

In Zend\Soap\Server::fault (https://github.com/zendframework/zf2/blob/master/library/Zend/Soap/Server.php#L1067) there is the functionality to transform an exception which is preregisterd with Zend\Soap\Server using the method registerFaultException.

Following the logic at line 1072, and $fault is an exception $code becomes the exception error code. The base class exception from PHP libraries defines \Exception::$code as an integer, which is tested in the constructor, and protected with final methods. This has the effect that \Exception::getCode() always returns an integer value.

On line 1086 this value is tested against an array of string values, therefor never making a match, causing the $code variable always being set to 'Receiver' on line 1087.

@GeeH
Copy link

GeeH commented Jun 27, 2016

This issue has been closed as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html

@GeeH GeeH closed this as completed Jun 27, 2016
@DannyvdSluijs
Copy link
Author

@GeeH Missed your to be closed label, and just read the mentioned article. Want me to (re)open at https://github.com/zendframework/zend-soap ?

@macnibblet
Copy link
Contributor

@DannyvdSluijs Yes, please do.

@DannyvdSluijs
Copy link
Author

Done zendframework/zend-soap#22

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants