Merge pull request #1083 from yongirl320/trackback-bug-fix

fix get trackback param bug
This commit is contained in:
joyqi 2021-04-03 21:09:18 +08:00 committed by GitHub
commit cc078d6f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ class Widget_Service extends Widget_Abstract_Options implements Widget_Interface
$urlPart = parse_url($url);
if (isset($urlPart['scheme'])) {
if ('http' != $urlPart['scheme'] || 'https' != $urlPart['scheme']) {
if ('http' != $urlPart['scheme'] && 'https' != $urlPart['scheme']) {
continue;
}
} else {
@ -131,8 +131,8 @@ class Widget_Service extends Widget_Abstract_Options implements Widget_Interface
}
/** 发送trackback */
if ($post->have() && !empty($this->request->trackback)) {
$links = $this->request->trackback;
if ($post->have() && !empty($this->request->getArray('trackback'))) {
$links = $this->request->getArray('trackback');
foreach ($links as $url) {
$client = Typecho_Http_Client::get();