Browse Source

fixed inconsistent return types for View::resolveBasePath

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
5dbf1e49fa
  1. 4
      framework/base/View.php

4
framework/base/View.php

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

Loading…
Cancel
Save