From 2603034e0a71b990604eeecac9dc18ff90b488a1 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 12 Feb 2020 10:14:52 +0100 Subject: [PATCH] MDL-67189 external: Catch Throwable in call_external_function --- lib/externallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/externallib.php b/lib/externallib.php index e6d5e99b955..c5cd8e7e859 100644 --- a/lib/externallib.php +++ b/lib/externallib.php @@ -252,7 +252,7 @@ class external_api { $response['error'] = false; $response['data'] = $result; - } catch (Exception $e) { + } catch (Throwable $e) { $exception = get_exception_info($e); unset($exception->a); $exception->backtrace = format_backtrace($exception->backtrace, true); -- 2.43.0