Commit 5dbf1e49 by Alexander Makarov

fixed inconsistent return types for View::resolveBasePath

parent 32f34b60
......@@ -388,9 +388,9 @@ class View extends Component
protected function resolveBasePath()
{
if (!empty($this->basePath)) {
return is_array($this->basePath) ? $this->basePath : array($this->basePath);
return (array)$this->basePath;
} elseif ($this->context instanceof Controller) {
return $this->context->module->getViewPath() . '/' . $this->context->getUniqueId();
return array($this->context->module->getViewPath() . '/' . $this->context->getUniqueId());
} elseif ($this->context !== null) {
$class = new \ReflectionClass($this->context);
return array(dirname($class->getFileName()) . '/views');
......
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