Fix for asset command.

This commit is contained in:
Qiang Xue
2013-07-16 21:43:17 -04:00
parent 368a4cfe66
commit a128bffb47
3 changed files with 49 additions and 82 deletions

View File

@@ -575,13 +575,9 @@ class View extends Component
if (!isset($this->assetBundles[$name])) {
$am = $this->getAssetManager();
$bundle = $am->getBundle($name);
if ($bundle !== null) {
$this->assetBundles[$name] = false;
$bundle->registerAssets($this);
$this->assetBundles[$name] = true;
} else {
throw new InvalidConfigException("Unknown asset bundle: $name");
}
$this->assetBundles[$name] = false;
$bundle->registerAssets($this);
$this->assetBundles[$name] = true;
} elseif ($this->assetBundles[$name] === false) {
throw new InvalidConfigException("A circular dependency is detected for bundle '$name'.");
}