mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-10-22 10:18:06 +02:00
outagelib: adjust exception trigger for phpunit10
This commit is contained in:
1 parent
c99d8f12a0
commit
a63ffed1bc
1 file changed
+3
-1
@@ -266,7 +266,9 @@ class outagelib {
|
||||
|
||||
// Used to test the try block in case of errors.
|
||||
if (PHPUNIT_TEST && optional_param('auth_outage_break_code', false, PARAM_INT)) {
|
||||
(new stdClass())->invalidfield; // Triggers an exception.
|
||||
if (!isset($emptyvar)) {
|
||||
throw new coding_exception('Empty variable "emptyvar" is empty');
|
||||
}
|
||||
}
|
||||
|
||||
// Nothing preventing the injection.
|
||||
|
||||
Reference in new issue
Block a user