为什么我会收到此错误?

时间:2011-09-20 15:27:34

标签: php pagination kohana kohana-3

我研究Kohana 3.2和分页。但我收到错误ErrorException [ Notice ]: Undefined property: Request::$uri

问题出在哪里?

分页类(模块)

switch ($this->config['current_page']['source'])
        {
            case 'query_string':
                return URL::site(Request::current()->uri).URL::query(array($this->config['current_page']['key'] => $page));

            case 'route':
                return URL::site(Request::current()->uri(array($this->config['current_page']['key'] => $page))).URL::query();
        }

1 个答案:

答案 0 :(得分:2)

使用Request::current()->uri()代替Request::current()->uri