fix #1854 add default values for theme_id and plugin_id

to handle undefined keys
This commit is contained in:
Linty 2024-06-11 09:28:09 +02:00
parent d0143e9259
commit 0fb7ee0523

View file

@ -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'])
{