From e3840909f5b09804032120691b4c246b056f3065 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 28 Nov 2022 19:30:51 +0000 Subject: [PATCH] MDL-76380 tool_oauth2: remove double persistent load on update. The method already loaded the validated persistent model data on the previous line, there's no need to do it again (while also trying to load unvalidated properties). --- lib/classes/oauth2/api.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/classes/oauth2/api.php b/lib/classes/oauth2/api.php index 5aeac855a57..a2211a09235 100644 --- a/lib/classes/oauth2/api.php +++ b/lib/classes/oauth2/api.php @@ -328,9 +328,6 @@ class api { protected static function create_or_update_issuer($data, bool $create): issuer { require_capability('moodle/site:config', context_system::instance()); $issuer = new issuer($data->id ?? 0, $data); - if (!empty($data->id)) { - $issuer->set_many((array)$data); - } // Will throw exceptions on validation failures. if ($create) {