Просмотр исходного кода

edit upgrade function to check if set

CauseFX 4 лет назад
Родитель
Сommit
d4b7ccce1f
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      api/functions/upgrade-functions.php

+ 4 - 2
api/functions/upgrade-functions.php

@@ -113,8 +113,10 @@ trait UpgradeFunctions
 			}
 			if ($updateComplete) {
 				$this->config = $this->config();
-				$this->removeConfigItem(['homepageOrdercustomhtml', 'homepageOrdercustomhtmlTwo', 'homepageCustomHTMLoneEnabled', 'homepageCustomHTMLoneAuth', 'customHTMLone', 'homepageCustomHTMLtwoEnabled', 'homepageCustomHTMLtwoAuth', 'customHTMLtwo']);
-				$this->config = $this->config();
+				$removeConfigItems = $this->removeConfigItem(['homepageOrdercustomhtml', 'homepageOrdercustomhtmlTwo', 'homepageCustomHTMLoneEnabled', 'homepageCustomHTMLoneAuth', 'customHTMLone', 'homepageCustomHTMLtwoEnabled', 'homepageCustomHTMLtwoAuth', 'customHTMLtwo']);
+				if ($removeConfigItems) {
+					$this->config = $this->config();
+				}
 				return true;
 			}
 		}