1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-23 08:33:24 +02:00

fix: connectivityaction (#2725)

This commit is contained in:
Dag
2022-05-17 23:46:37 +02:00
committed by GitHub
parent 7a87a09fc5
commit 0212c4790f
2 changed files with 16 additions and 10 deletions

View File

@@ -83,12 +83,10 @@ class ConnectivityAction extends ActionAbstract {
try {
$reply = getContents($bridge::URI, array(), $curl_opts, true);
if($reply) {
if($reply['code'] === 200) {
$retVal['successful'] = true;
if (isset($reply['header'])) {
if (strpos($reply['header'], 'HTTP/1.1 301 Moved Permanently') !== false) {
$retVal['http_code'] = 301;
}
if (strpos(implode('', $reply['status_lines']), '301 Moved Permanently')) {
$retVal['http_code'] = 301;
}
}
} catch(Exception $e) {