From f9a80888bcd2bd96a8345e0566302fdc202a49c8 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Mon, 13 Jan 2020 16:41:55 +0100 Subject: [PATCH] MDL-67680 core: Catch PHP exceptions in the after_config callback --- lib/setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index 4b6588aa3db..09d4588f307 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -1047,7 +1047,7 @@ foreach ($pluginswithfunction as $plugins) { foreach ($plugins as $function) { try { $function(); - } catch (Exception $e) { + } catch (Throwable $e) { debugging("Exception calling '$function'", DEBUG_DEVELOPER, $e->getTrace()); } }