From c7f36a5afa08fcf6fb2678a0aff5dd087ad252ab Mon Sep 17 00:00:00 2001 From: Alexander Fuhr Date: Wed, 12 Nov 2014 17:03:22 +0100 Subject: [PATCH] Fix empty preferences array warning in the DbStore --- library/Icinga/User/Preferences/Store/DbStore.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/Icinga/User/Preferences/Store/DbStore.php b/library/Icinga/User/Preferences/Store/DbStore.php index 1391b25c6..4d7b10584 100644 --- a/library/Icinga/User/Preferences/Store/DbStore.php +++ b/library/Icinga/User/Preferences/Store/DbStore.php @@ -128,7 +128,9 @@ class DbStore extends PreferencesStore if (! array_key_exists($section, $this->preferences)) { $this->preferences[$section] = array(); } - + if (! array_key_exists($section, $preferences)) { + $preferences[$section] = array(); + } $toBeInserted = array_diff_key($preferences[$section], $this->preferences[$section]); if (!empty($toBeInserted)) { $this->insert($toBeInserted, $section);