aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-08-25 20:43:02 +0000
committermkanat%bugzilla.org <>2008-08-25 20:43:02 +0000
commit5d2512f3f34d085f698a3dffad80e575beeaed77 (patch)
tree057a55d863bcd88b18b331144d41ce53e03cc824
parentBug 247936: Creating a product/component which already existed crashes when a... (diff)
downloadbugzilla-5d2512f3f34d085f698a3dffad80e575beeaed77.tar.gz
bugzilla-5d2512f3f34d085f698a3dffad80e575beeaed77.tar.bz2
bugzilla-5d2512f3f34d085f698a3dffad80e575beeaed77.zip
Bug 446327 – WebService faultCode is a string when a script "die"s
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
-rwxr-xr-xxmlrpc.cgi5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmlrpc.cgi b/xmlrpc.cgi
index 7682b20f5..924610a0b 100755
--- a/xmlrpc.cgi
+++ b/xmlrpc.cgi
@@ -21,6 +21,7 @@ use lib qw(.);
use Bugzilla;
use Bugzilla::Constants;
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.
@@ -29,6 +30,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 });