diff --git a/bridges/GithubIssueBridge.php b/bridges/GithubIssueBridge.php index 9a2b7ec17f2..2eddeb2eefb 100644 --- a/bridges/GithubIssueBridge.php +++ b/bridges/GithubIssueBridge.php @@ -242,24 +242,8 @@ public function collectData(){ public function detectParameters($url) { - $help = <</ -For issue comments the URL must include ///issues/ - -Examples: -- https://github.com/rss-bridge/rss-bridge -- https://github.com/rss-bridge/rss-bridge/issues/1 - -Issue comments for project issues are enabled if the URL points to issues -https://github.com/rss-bridge/rss-bridge/issues -EOD; - if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false || strpos($url, self::URI) !== 0) { - returnClientError('Invalid URL' . $help); return null; } @@ -273,11 +257,7 @@ public function detectParameters($url) { } break; case 3: { // Project issues with issue comments if($path_segments[2] !== 'issues') { - returnClientError('Invalid path. Expected "/issues/", found "/' - . $path_segments[2] - . '/"' - . $help - ); + return null; } list($user, $project) = $path_segments; $show_comments = 'on'; @@ -286,7 +266,7 @@ public function detectParameters($url) { list($user, $project, /* issues */, $issue) = $path_segments; } break; default: { - returnClientError('Invalid path.' . $help); + return null; } }