diff --git a/classes/local/outagelib.php b/classes/local/outagelib.php index 82cab6a..ffcc254 100644 --- a/classes/local/outagelib.php +++ b/classes/local/outagelib.php @@ -266,7 +266,7 @@ 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. + throw new coding_exception('Exception triggered'); } // Nothing preventing the injection.