diff --git a/mod/lti/openid-registration.php b/mod/lti/openid-registration.php index a9d748bc32e42..421e237b7bbd0 100644 --- a/mod/lti/openid-registration.php +++ b/mod/lti/openid-registration.php @@ -52,7 +52,7 @@ if ($doregister) { $registrationpayload = json_decode(file_get_contents('php://input'), true); $config = registration_helper::get()->registration_to_config($registrationpayload, $tokenres['clientid']); - if ($type->id) { + if (!empty($type->id)) { lti_update_type($type, clone $config); $typeid = $type->id; } else {