From 8a72ceb94076deb61a5aa01eaf967ef21ba7fabe Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 16 Nov 2018 12:10:11 +0100 Subject: [PATCH] T4428: Fix removing calendar categories in settings --- plugins/calendar/calendar.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 4b45cdb7..4cf360a8 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -773,6 +773,10 @@ class calendar extends rcube_plugin $colors = (array) rcube_utils::get_input_value('_colors', rcube_utils::INPUT_POST); foreach ($categories as $key => $name) { + if (!isset($colors[$key])) { + continue; + } + $color = preg_replace('/^#/', '', strval($colors[$key])); // rename categories in existing events -> driver's job