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

This commit is contained in:
Alexander Makarov
2013-12-12 18:39:40 +01:00
parent 43f19e8aee
commit 2355c764a8
2 changed files with 6 additions and 3 deletions

View File

@ -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)

View File

@ -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]);
}