Commit 0fa8f8cc by Dmitry Erofeev

fixed Theme::getPath()

parent ac0a56e9
...@@ -180,6 +180,10 @@ class Theme extends Component ...@@ -180,6 +180,10 @@ class Theme extends Component
*/ */
public function getPath($path) public function getPath($path)
{ {
return $this->getBasePath() . DIRECTORY_SEPARATOR . ltrim($path, '/\\'); if (($basePath = $this->getBasePath()) !== null) {
return $basePath . DIRECTORY_SEPARATOR . ltrim($path, '/\\');
} else {
throw new InvalidConfigException('The "basePath" property must be set.');
}
} }
} }
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