typecho/typecho · error · IXR\Exception
16
16
Error message
源地址服务器错误
What it means
Error "源地址服务器错误" thrown in typecho/typecho.
Source
Thrown at var/Widget/XmlRpc.php:1678
/**
* pingbackPing
*
* @param string $source
* @param string $target
* @return int
* @throws \Exception
*/
public function pingbackPing(string $source, string $target): int
{
/** 检查目标地址是否正确*/
$pathInfo = Common::url(substr($target, strlen($this->options->index)), '/');
$post = Router::match($pathInfo);
/** 检查源地址是否合法 */
$params = parse_url($source);
if (false === $params || !in_array($params['scheme'], ['http', 'https'])) {
throw new Exception(_t('源地址服务器错误'), 16);
}
if (!Common::checkSafeHost($params['host'])) {
throw new Exception(_t('源地址服务器错误'), 16);
}
/** 这样可以得到cid或者slug*/
if (!($post instanceof Archive) || !$post->have() || !$post->is('single')) {
throw new Exception(_t('这个目标地址不存在'), 33);
}
if ($post) {
/** 检查是否可以ping*/
if ($post->allowPing) {
/** 现在可以ping了,但是还得检查下这个pingback是否已经存在了*/
$pingNum = $this->db->fetchObject($this->db->select(['COUNT(coid)' => 'num'])
->from('table.comments')View on GitHub (pinned to 56f4c6f339)
When it happens
Trigger: Thrown at var/Widget/XmlRpc.php:1678 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/73275929a3e9e0c1.
Report an issue: GitHub.