From 4f32833e3047809e2f8ba5d77855374a9154d23a Mon Sep 17 00:00:00 2001 From: frytimo Date: Thu, 26 Sep 2024 10:53:30 -0300 Subject: [PATCH] fix dashboard break when app removed (#7141) Places a guard to check for the file existing before the file is included. Without the guard, PHP will stop with a fatal error. --- core/dashboard/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/dashboard/index.php b/core/dashboard/index.php index 7d10bb6e54..f58b4da2b3 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -562,7 +562,9 @@ function toggle_grid_row_end_all() { $path_array = glob(dirname(__DIR__, 2).'/*/'.$application_name.'/resources/dashboard/'.$widget_name.'.php'); echo "
\n"; - include $path_array[0]; + if (file_exists($path_array[0])) { + include $path_array[0]; + } echo "
\n"; $x++;