Browse Source

Fix #17606: Fix error in `AssetBundle` when a disabled bundle with custom init() was still published

tags/2.0.29
Alexandr Kozhevnikov 5 years ago committed by Alexander Makarov
parent
commit
848ab0ce6e
  1. 2
      framework/CHANGELOG.md
  2. 12
      framework/web/AssetManager.php

2
framework/CHANGELOG.md

@ -5,7 +5,7 @@ Yii Framework 2 Change Log
------------------------
- Bug #17573: `EmailValidator` with `checkDNS=true` throws `ErrorException` on bad domains on Alpine (batyrmastyr)
- Bug #17606: Fix error in `AssetBundle` when a disabled bundle with custom init() was still published (onmotion)
2.0.28 October 08, 2019
-----------------------

12
framework/web/AssetManager.php

@ -278,12 +278,12 @@ class AssetManager extends Component
protected function loadDummyBundle($name)
{
if (!isset($this->_dummyBundles[$name])) {
$this->_dummyBundles[$name] = $this->loadBundle($name, [
'sourcePath' => null,
'js' => [],
'css' => [],
'depends' => [],
]);
$bundle = Yii::createObject(['class' => $name]);
$bundle->sourcePath = null;
$bundle->js = [];
$bundle->css = [];
$this->_dummyBundles[$name] = $bundle;
}
return $this->_dummyBundles[$name];

Loading…
Cancel
Save