警告:在第 465 行的 /Applications/MAMP/htdocs/getv/library/Zend/Paginator.php 中未提供视图部分且未设置默认值
这是我在加载分页器时收到的警告消息;有人可以给我解决问题的方法或提示吗?
public function getPaginator() {
if ($this->view === null) {
$this->view = $this->getActionController()->view;
}
$db = Zend_Db_Table::getDefaultAdapter();
/* @var $searcher ZendX_Searcher_Abstract */
foreach ($this->searchers as $searcher) {
$searcher->setRequest($this->getRequest())
->setView($this->view)
->setSelect($this->select)
->perform();
}
$paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbSelect($this->select));
$paginator->setCurrentPageNumber($this->getRequest()->getParam('page', 1));
$paginator->setPageRange(7);
if ($this->perPage > 0) {
$paginator->setItemCountPerPage($this->perPage);
} else {
$paginator->setItemCountPerPage(PHP_INT_MAX);
}
return $paginator;
}