From c9a7119b91beb7908405054569bee8f558d13802 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 31 May 2013 08:43:15 -0400 Subject: [PATCH] Fixes issue #467: allow view file to be absent as long as the themed version exists. --- framework/yii/base/View.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index 7f965fa..219a0fb 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -235,10 +235,10 @@ class View extends Component public function renderFile($viewFile, $params = array(), $context = null) { $viewFile = Yii::getAlias($viewFile); + if ($this->theme !== null) { + $viewFile = $this->theme->applyTo($viewFile); + } if (is_file($viewFile)) { - if ($this->theme !== null) { - $viewFile = $this->theme->applyTo($viewFile); - } $viewFile = FileHelper::localize($viewFile); } else { throw new InvalidParamException("The view file does not exist: $viewFile");