Fix #17670: Fix overriding core component class using __class

This commit is contained in:
Yusup Hambali
2019-11-20 00:10:26 +07:00
committed by Alexander Makarov
parent 166f892f14
commit c1e9739ed2
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Yii Framework 2 Change Log
- Bug #17648: Handle empty column arrays in console `Table` widget (alex-code) - Bug #17648: Handle empty column arrays in console `Table` widget (alex-code)
- Bug #17657: Fix migration errors from missing `$schema` in RBAC init file when using MSSQL (PoohOka) - Bug #17657: Fix migration errors from missing `$schema` in RBAC init file when using MSSQL (PoohOka)
- Bug #17434: IE Ajax redirect fix for non 11.0 versions (kamarton) - Bug #17434: IE Ajax redirect fix for non 11.0 versions (kamarton)
- Bug #17670: Fix overriding core component class using `__class` (sup-ham, samdark)
2.0.29 October 22, 2019 2.0.29 October 22, 2019
----------------------- -----------------------

View File

@ -258,7 +258,7 @@ abstract class Application extends Module
foreach ($this->coreComponents() as $id => $component) { foreach ($this->coreComponents() as $id => $component) {
if (!isset($config['components'][$id])) { if (!isset($config['components'][$id])) {
$config['components'][$id] = $component; $config['components'][$id] = $component;
} elseif (is_array($config['components'][$id]) && !isset($config['components'][$id]['class'])) { } elseif (is_array($config['components'][$id]) && !isset($config['components'][$id]['class']) && !isset($config['components'][$id]['__class'])) {
$config['components'][$id]['class'] = $component['class']; $config['components'][$id]['class'] = $component['class'];
} }
} }