diff --git a/src/usr/local/emhttp/plugins/plugin-diagnostics/include/page.php b/src/usr/local/emhttp/plugins/plugin-diagnostics/include/page.php index 66d41d8..d8e476d 100644 --- a/src/usr/local/emhttp/plugins/plugin-diagnostics/include/page.php +++ b/src/usr/local/emhttp/plugins/plugin-diagnostics/include/page.php @@ -53,8 +53,13 @@ function includePage(string $filename, array $params = array()): string if (is_file($filename)) { ob_start(); - include $filename; - return ob_get_clean() ?: ""; + try { + include $filename; + return ob_get_clean() ?: ""; + } catch (\Throwable $e) { + ob_end_clean(); + throw $e; + } } return ""; }