From 0fb7ee052370c1b78174da688a75c7c2f110430e Mon Sep 17 00:00:00 2001 From: Linty Date: Tue, 11 Jun 2024 09:28:09 +0200 Subject: [PATCH] fix #1854 add default values for theme_id and plugin_id to handle undefined keys --- admin/maintenance_sys.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/admin/maintenance_sys.php b/admin/maintenance_sys.php index 5a8334d77..ffc9fba6f 100644 --- a/admin/maintenance_sys.php +++ b/admin/maintenance_sys.php @@ -167,7 +167,11 @@ if (is_webmaster()) case ACTIVITY_SYSTEM_PLUGIN: $object_icon = 'icon-puzzle'; - $object = str_replace(['_', '-'], ' ', $details['plugin_id']); + $object = 'plugin'; + if (isset($details['plugin_id'])) + { + $object = str_replace(['_', '-'], ' ', $details['plugin_id']); + } switch ($rows['action']) { case 'install': @@ -244,7 +248,11 @@ if (is_webmaster()) case ACTIVITY_SYSTEM_THEME: $object_icon = 'icon-brush'; - $object = str_replace(['_', '-'], ' ', $details['theme_id']); + $object = 'theme'; + if (isset($details['theme_id'])) + { + $object = str_replace(['_', '-'], ' ', $details['theme_id']); + } switch ($rows['action']) {