Commit 2355c764 by Alexander Makarov

Fixed `Call to a member function registerAssetFiles() on a non-object` in case…

Fixed `Call to a member function registerAssetFiles() on a non-object` in case of wrong `sourcePath` for an asset bundle
parent 43f19e8a
......@@ -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)
......
......@@ -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]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment