diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index ff87ca10c..2628eee3d 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -5,6 +5,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE ## 1.0.24 ++ [#1969](https://github.com/luyadev/luya/pull/1969) Fixed exception handling while loading empty theme directories. + [#1977](https://github.com/luyadev/luya/pull/1977) Added new `ArrayHelper::combine()` method to generate an array with the same keys and values. + [#1977](https://github.com/luyadev/luya/pull/1978) Added support for ActiveForm context to SubmitButtonWidget. Supporting multi form (including pjax) on same page. diff --git a/core/theme/ThemeManager.php b/core/theme/ThemeManager.php index ce1f733e3..5d905c1cd 100755 --- a/core/theme/ThemeManager.php +++ b/core/theme/ThemeManager.php @@ -89,7 +89,7 @@ final public function setup() $basePath = $this->getActiveThemeBasePath(); if ($basePath) { $this->beforeSetup($basePath); - + $themeConfig = $this->getThemeByBasePath($basePath); $theme = new Theme($themeConfig); $this->activate($theme); @@ -128,12 +128,11 @@ protected function getActiveThemeBasePath() /** * Get all theme configs as array list. * - * @param bool $throwException - * + * @param bool $throwException Whether an exception should by throw or not. By version 1.0.24 this is disabled by default. * @return ThemeConfig[] * @throws \yii\base\Exception */ - public function getThemes($throwException = true) + public function getThemes($throwException = false) { if ($this->_themes) { return $this->_themes; diff --git a/tests/core/theme/ThemeManagerTest.php b/tests/core/theme/ThemeManagerTest.php index b4d0ae8b5..99e23946b 100644 --- a/tests/core/theme/ThemeManagerTest.php +++ b/tests/core/theme/ThemeManagerTest.php @@ -135,7 +135,7 @@ public function testNotReadableThemeDir() mkdir(Yii::getAlias('@app/themes/not-readable'), 0200); try { - $themeManager->getThemes(); + $themeManager->getThemes(true); } finally { rmdir(Yii::getAlias('@app/themes/not-readable')); } @@ -153,7 +153,7 @@ public function testEmptyThemeDir() mkdir(Yii::getAlias('@app/otherThemeLocation/emptyThemeDir')); try { - $themeManager->getThemes(); + $themeManager->getThemes(true); } finally { rmdir(Yii::getAlias('@app/otherThemeLocation/emptyThemeDir')); } @@ -193,6 +193,6 @@ public function testDuplicateThemeDefinition() Yii::$app->getPackageInstaller()->getConfigs()['luyadev/luya-core']->setValue('themes', ['@app/themes/blank']); $themeManager = new ThemeManager(); - $themeManager->getThemes(); + $themeManager->getThemes(true); } }