From 684343eee78d5c18b025609a93a3772f4a8df368 Mon Sep 17 00:00:00 2001 From: Meirza Date: Thu, 19 Jan 2023 21:58:18 +0700 Subject: [PATCH] MDL-77350 auth: Added class properties that are not declared In PHP 8.2 and later, setting a value to an undeclared class property is deprecated and emits a deprecation notice. So we need to add missing class properties that still need to be declared. --- auth/email/tests/external/external_test.php | 6 ++++++ auth/ldap/auth.php | 12 ++++++++++++ auth/mnet/auth.php | 3 +++ 3 files changed, 21 insertions(+) diff --git a/auth/email/tests/external/external_test.php b/auth/email/tests/external/external_test.php index e69e90e585b..79cd4226fff 100644 --- a/auth/email/tests/external/external_test.php +++ b/auth/email/tests/external/external_test.php @@ -45,6 +45,12 @@ require_once($CFG->dirroot . '/webservice/tests/helpers.php'); */ class external_test extends externallib_advanced_testcase { + /** @var int custom profile field1 ID. */ + protected $field1; + + /** @var int custom profile field2 ID. */ + protected $field2; + /** * Set up for every test */ diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 567d00c6f29..eff6fe2d913 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -86,6 +86,18 @@ require_once($CFG->dirroot.'/auth/ldap/locallib.php'); */ class auth_plugin_ldap extends auth_plugin_base { + /** @var string */ + protected $roleauth; + + /** @var string */ + public $pluginconfig; + + /** @var LDAP\Connection LDAP connection. */ + protected $ldapconnection; + + /** @var int */ + protected $ldapconns = 0; + /** * Init plugin config from database settings depending on the plugin auth type. */ diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index ade0cc3b88a..f86b3b4495b 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -32,6 +32,9 @@ require_once($CFG->libdir.'/authlib.php'); */ class auth_plugin_mnet extends auth_plugin_base { + /** @var mnet_environment mnet environment. */ + protected $mnet; + /** * Constructor. */