aboutsummaryrefslogtreecommitdiffstats
path: root/jsonrpc.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'jsonrpc.cgi')
-rwxr-xr-x[-rw-r--r--]jsonrpc.cgi8
1 files changed, 5 insertions, 3 deletions
diff --git a/jsonrpc.cgi b/jsonrpc.cgi
index cd41663fa..25fb4c175 100644..100755
--- a/jsonrpc.cgi
+++ b/jsonrpc.cgi
@@ -27,10 +27,12 @@ use Bugzilla;
use Bugzilla::Constants;
use Bugzilla::Error;
use Bugzilla::WebService::Constants;
-# This eval allows runtests to pass even if JSON::RPC isn't
-# installed.
+if (!Bugzilla->feature('jsonrpc')) {
+ ThrowCodeError('feature_disabled', { feature => 'jsonrpc' });
+}
+
+# This eval allows runtests.pl to pass.
eval { require Bugzilla::WebService::Server::JSONRPC; };
-$@ && ThrowCodeError('json_rpc_not_installed');
Bugzilla->usage_mode(USAGE_MODE_JSON);