Bug 446327: WebService faultCode is a string when a script "die"s

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat


git-svn-id: svn://10.0.0.236/trunk@253809 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkanat%bugzilla.org 2008-08-25 15:41:26 +00:00
parent 4c20e086d3
commit 218be26447

View File

@ -22,6 +22,7 @@ use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::Hook;
use Bugzilla::WebService::Constants;
# Use an eval here so that runtests.pl accepts this script even if SOAP-Lite
# is not installed.
@ -30,6 +31,10 @@ eval 'use XMLRPC::Transport::HTTP;
$@ && ThrowCodeError('soap_not_installed');
Bugzilla->usage_mode(Bugzilla::Constants::USAGE_MODE_WEBSERVICE);
local $SOAP::Constants::FAULT_SERVER = ERROR_UNKNOWN_FATAL;
# The line above is used, this one is ignored, but SOAP::Lite
# might start using this constant (the correct one) for XML-RPC someday.
local $XMLRPC::Constants::FAULT_SERVER = ERROR_UNKNOWN_FATAL;
my %hook_dispatch;
Bugzilla::Hook::process('webservice', { dispatch => \%hook_dispatch });