typecho/typecho · error · Typecho\Widget\Exception
Page Not Exists
Error message
Page Not Exists
What it means
Error "Page Not Exists" thrown in typecho/typecho.
Source
Thrown at var/Typecho/Widget/Helper/PageNavigator.php:81
/**
* 构造函数,初始化页面基本信息
*
* @param integer $total 记录总数
* @param integer $currentPage 当前页面
* @param integer $pageSize 每页记录数
* @param string $pageTemplate 页面链接模板
* @throws Exception
*/
public function __construct(int $total, int $currentPage, int $pageSize, string $pageTemplate)
{
$this->total = $total;
$this->totalPage = ceil($total / $pageSize);
$this->currentPage = $currentPage;
$this->pageSize = $pageSize;
$this->pageTemplate = $pageTemplate;
if (($currentPage > $this->totalPage || $currentPage < 1) && $total > 0) {
throw new Exception('Page Not Exists', 404);
}
}
/**
* 设置页面占位符
*
* @param string $holder 页面占位符
*/
public function setPageHolder(string $holder)
{
$this->pageHolder = ['{' . $holder . '}',
str_replace(['{', '}'], ['%7B', '%7D'], $holder)];
}
/**
* 设置锚点
*
* @param string $anchor 锚点View on GitHub (pinned to 56f4c6f339)
When it happens
Trigger: Thrown at var/Typecho/Widget/Helper/PageNavigator.php:81 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of typecho/typecho@56f4c6f339 (2026-08-21).
Data as JSON: /api/errors/3815d0558a4b9c27.
Report an issue: GitHub.