diff --git a/system/View/View.php b/system/View/View.php index 5e860853f44c..7ca89ac0c9ad 100644 --- a/system/View/View.php +++ b/system/View/View.php @@ -202,8 +202,10 @@ public function render(string $view, ?array $options = null, ?bool $saveData = n $this->renderVars['file'] = $this->viewPath . $this->renderVars['view']; if (str_contains($this->renderVars['view'], '\\')) { - $overrideFolder = $this->config->appOverridesFolder !== '' - ? trim($this->config->appOverridesFolder, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR + $appOverridesFolder = $this->config->appOverridesFolder ?? 'overrides'; + + $overrideFolder = $appOverridesFolder !== '' + ? trim($appOverridesFolder, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : ''; $this->renderVars['file'] = $this->viewPath diff --git a/user_guide_src/source/changelogs/v4.7.1.rst b/user_guide_src/source/changelogs/v4.7.1.rst index 5f2ca988ce63..3bed48085ea3 100644 --- a/user_guide_src/source/changelogs/v4.7.1.rst +++ b/user_guide_src/source/changelogs/v4.7.1.rst @@ -43,6 +43,7 @@ Bugs Fixed - **Model:** Fixed a bug where ``BaseModel::updateBatch()`` threw an exception when ``updateOnlyChanged`` was ``true`` and the index field value did not change. - **Session:** Fixed a bug in ``MemcachedHandler`` where the constructor incorrectly threw an exception when ``savePath`` was not empty. - **Toolbar:** Fixed a bug where the standalone toolbar page loaded from ``?debugbar_time=...`` was not interactive. +- **View:** Fixed a bug where ``View`` would throw an error if the ``appOverridesFolder`` config property was not defined. See the repo's `CHANGELOG.md `_