Browse Source

Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
2355c764a8
  1. 1
      framework/CHANGELOG.md
  2. 8
      framework/yii/web/View.php

1
framework/CHANGELOG.md

@ -5,6 +5,7 @@ Yii Framework 2 Change Log
----------------------------
- Bug #1446: Logging while logs are processed causes infinite loop (qiangxue)
- Bug: Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle (samdark)
- Enh #1293: Replaced Console::showProgress() with a better approach. See Console::startProgress() for details (cebe)
- Enh #1406: DB Schema support for Oracle Database (p0larbeer, qiangxue)
- Enh #1437: Added ListView::viewParams (qiangxue)

8
framework/yii/web/View.php

@ -184,10 +184,12 @@ class View extends \yii\base\View
return;
}
$bundle = $this->assetBundles[$name];
foreach ($bundle->depends as $dep) {
$this->registerAssetFiles($dep);
if ($bundle) {
foreach ($bundle->depends as $dep) {
$this->registerAssetFiles($dep);
}
$bundle->registerAssetFiles($this);
}
$bundle->registerAssetFiles($this);
unset($this->assetBundles[$name]);
}

Loading…
Cancel
Save