Fix setup crash on upgrade when env-production / data/cache-production have been deleted (missing dict files)

This commit is contained in:
Molkobain
2021-10-21 15:13:48 +02:00
parent ed43d00afe
commit ef9c18e393
2 changed files with 12 additions and 1 deletions

View File

@@ -216,7 +216,7 @@ class WebPage implements Page
$this->bHasCollapsibleSection = false;
$this->bPrintable = $bPrintable;
// Note: JS dict. entries cannot be added to a page if current environment and config file aren't available yet.
$this->bAddJSDict = class_exists('\Dict') && file_exists(utils::GetConfigFilePath());
$this->bAddJSDict = class_exists('\Dict') && is_dir(utils::GetCompiledEnvironmentPath()) && file_exists(utils::GetConfigFilePath());
$this->oContentLayout = new UIContentBlock();
$this->SetTemplateRelPath(static::DEFAULT_PAGE_TEMPLATE_REL_PATH);