Ver Fonte

edit upgrade function to check if set

CauseFX há 4 anos atrás
pai
commit
d4b7ccce1f
1 ficheiros alterados com 4 adições e 2 exclusões
  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;
 			}
 		}