From 0fb25668c4fce09473711e5b50602d50e5e5ebe5 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Thu, 3 Nov 2016 11:11:40 -0400 Subject: [PATCH] Update SystemUpdater module to remove any session data associated with admin theme when a core update occurs --- wire/modules/System/SystemUpdater/SystemUpdater.module | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wire/modules/System/SystemUpdater/SystemUpdater.module b/wire/modules/System/SystemUpdater/SystemUpdater.module index 3d9c1f64..9e61c029 100644 --- a/wire/modules/System/SystemUpdater/SystemUpdater.module +++ b/wire/modules/System/SystemUpdater/SystemUpdater.module @@ -144,9 +144,12 @@ class SystemUpdater extends WireData implements Module, ConfigurableModule { $this->configData['coreVersion'] = $toVersion; $this->wire('modules')->saveModuleConfigData($this, $this->configData); - /** @var AdminTheme $adminTheme */ - $adminTheme = $this->wire('adminTheme'); - if($adminTheme) $adminTheme->coreUpdate($fromVersion, $toVersion); + // remove admin theme cached info in session + foreach($this->wire('session') as $key => $value) { + if(strpos($key, 'AdminTheme') === 0) { + $this->wire('session')->remove($key); + } + } } /**