From 17dd5bbae07d2d7ce96095437300cb0e918efd2b Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 14 Mar 2022 18:50:12 +0000 Subject: [PATCH] MDL-74202 webservice: fix protocol type in exception message. --- webservice/lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webservice/lib.php b/webservice/lib.php index e0c5d8054e3..96875125a34 100644 --- a/webservice/lib.php +++ b/webservice/lib.php @@ -1137,7 +1137,8 @@ abstract class webservice_server implements webservice_server_interface { $this->userid = $user->id; if ($this->authmethod != WEBSERVICE_AUTHMETHOD_SESSION_TOKEN && !has_capability("webservice/$this->wsname:use", $this->restricted_context)) { - throw new webservice_access_exception('You are not allowed to use the {$a} protocol (missing capability: webservice/' . $this->wsname . ':use)'); + throw new webservice_access_exception("You are not allowed to use the {$this->wsname} protocol " . + "(missing capability: webservice/{$this->wsname}:use)"); } external_api::set_context_restriction($this->restricted_context);