From d075218248175b3bfd5bdfe535ab6aa8d1e2337f Mon Sep 17 00:00:00 2001 From: diosmosis Date: Tue, 11 Mar 2014 14:32:18 +0000 Subject: Tweak to WidgetsList (check if category exists before removing widget). --- core/WidgetsList.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/WidgetsList.php') diff --git a/core/WidgetsList.php b/core/WidgetsList.php index 057e85b165..ca974e0ce9 100644 --- a/core/WidgetsList.php +++ b/core/WidgetsList.php @@ -163,6 +163,10 @@ class WidgetsList */ static public function remove($widgetCategory, $widgetName = false) { + if (!isset(self::$widgets[$widgetCategory])) { + return; + } + if (empty($widgetName)) { unset(self::$widgets[$widgetCategory]); return; -- cgit v1.2.3