{"action":"created","comment":{"url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/comments/107988236","pull_request_review_id":28997984,"id":107988236,"diff_hunk":"@@ -83,15 +83,23 @@ public static function renderDiscordTag( $input, array $args ) {\n \t\t\t$theme = 'dark';\n \t\t}\n \n-\t\tif ( self::isDiscordServerIDValid( $discordServerID ) ) {\n-\t\t\t$output = '<iframe class=\"ext-discord-widget\"\n+\t\tif (\n+\t\t\t$discordServerID === htmlspecialchars( $args['server-id'], ENT_QUOTES ) || \n+\t\t\t$discordServerID === wfMessage( 'discord-server-id-default' )->escaped()\n+\t\t) {\n+\t\t\tif ( self::isDiscordServerIDValid( $discordServerID ) ) {\n+\t\t\t\t$output = '<iframe class=\"ext-discord-widget\"\n \t\t\t\tsrc=\"https://discordapp.com/widget?id=' . $discordServerID .'&theme=' . $theme . '\"\n \t\t\t\twidth=\"'. intval( $discordWidth ) .'\"\n \t\t\t\theight=\"' . intval ( $discordHeight ) . '\"\n \t\t\t\tallowtransparency=\"true\"\n \t\t\t\tframeborder=\"0\"></iframe>';\n \n-\t\t\treturn $output;\n+\t\t\t\treturn $output;\n+\t\t\t}\n+\t\t} elseif ( empty( $discordServerID ) ) {\n+\t\t\tMediaWiki\\suppressWarnings();","path":"includes/Discord.class.php","position":40,"original_position":40,"commit_id":"de7c8174d5dbe37bcc96556da5689d6c51b90878","original_commit_id":"de7c8174d5dbe37bcc96556da5689d6c51b90878","user":{"login":"mary-kate","id":2213994,"avatar_url":"https://avatars3.githubusercontent.com/u/2213994?v=3","gravatar_id":"","url":"https://api.github.com/users/mary-kate","html_url":"https://github.com/mary-kate","followers_url":"https://api.github.com/users/mary-kate/followers","following_url":"https://api.github.com/users/mary-kate/following{/other_user}","gists_url":"https://api.github.com/users/mary-kate/gists{/gist_id}","starred_url":"https://api.github.com/users/mary-kate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mary-kate/subscriptions","organizations_url":"https://api.github.com/users/mary-kate/orgs","repos_url":"https://api.github.com/users/mary-kate/repos","events_url":"https://api.github.com/users/mary-kate/events{/privacy}","received_events_url":"https://api.github.com/users/mary-kate/received_events","type":"User","site_admin":false},"body":"Hmm, seems that you should define `$discordServerID` as something in `getDiscordServerIDOutput()` _before_ the if-else loop (L52 onwards) -- maybe something as simple as `$discordServerID = '';` or `$discordServerID = false;` will do the trick? ","created_at":"2017-03-24T20:01:26Z","updated_at":"2017-03-24T20:01:26Z","html_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2#discussion_r107988236","pull_request_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/comments/107988236"},"html":{"href":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2#discussion_r107988236"},"pull_request":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2","id":111441218,"html_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2","diff_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2.diff","patch_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2.patch","issue_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/2","number":2,"state":"open","locked":false,"title":"v1.0.6 - return the right response when the server ID doesn't equal anything","user":{"login":"SamanthaNguyen","id":4723983,"avatar_url":"https://avatars0.githubusercontent.com/u/4723983?v=3","gravatar_id":"","url":"https://api.github.com/users/SamanthaNguyen","html_url":"https://github.com/SamanthaNguyen","followers_url":"https://api.github.com/users/SamanthaNguyen/followers","following_url":"https://api.github.com/users/SamanthaNguyen/following{/other_user}","gists_url":"https://api.github.com/users/SamanthaNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/SamanthaNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamanthaNguyen/subscriptions","organizations_url":"https://api.github.com/users/SamanthaNguyen/orgs","repos_url":"https://api.github.com/users/SamanthaNguyen/repos","events_url":"https://api.github.com/users/SamanthaNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/SamanthaNguyen/received_events","type":"User","site_admin":false},"body":null,"created_at":"2017-03-19T08:09:56Z","updated_at":"2017-03-24T20:01:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64f39e78b3adfbd13297ccbc9a6020d8038723f9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2/commits","review_comments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2/comments","review_comment_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/2/comments","statuses_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/statuses/de7c8174d5dbe37bcc96556da5689d6c51b90878","head":{"label":"SamanthaNguyen:output-the-right-error","ref":"output-the-right-error","sha":"de7c8174d5dbe37bcc96556da5689d6c51b90878","user":{"login":"SamanthaNguyen","id":4723983,"avatar_url":"https://avatars0.githubusercontent.com/u/4723983?v=3","gravatar_id":"","url":"https://api.github.com/users/SamanthaNguyen","html_url":"https://github.com/SamanthaNguyen","followers_url":"https://api.github.com/users/SamanthaNguyen/followers","following_url":"https://api.github.com/users/SamanthaNguyen/following{/other_user}","gists_url":"https://api.github.com/users/SamanthaNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/SamanthaNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamanthaNguyen/subscriptions","organizations_url":"https://api.github.com/users/SamanthaNguyen/orgs","repos_url":"https://api.github.com/users/SamanthaNguyen/repos","events_url":"https://api.github.com/users/SamanthaNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/SamanthaNguyen/received_events","type":"User","site_admin":false},"repo":{"id":84886246,"name":"mediawiki-extensions-Discord","full_name":"SamanthaNguyen/mediawiki-extensions-Discord","owner":{"login":"SamanthaNguyen","id":4723983,"avatar_url":"https://avatars0.githubusercontent.com/u/4723983?v=3","gravatar_id":"","url":"https://api.github.com/users/SamanthaNguyen","html_url":"https://github.com/SamanthaNguyen","followers_url":"https://api.github.com/users/SamanthaNguyen/followers","following_url":"https://api.github.com/users/SamanthaNguyen/following{/other_user}","gists_url":"https://api.github.com/users/SamanthaNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/SamanthaNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamanthaNguyen/subscriptions","organizations_url":"https://api.github.com/users/SamanthaNguyen/orgs","repos_url":"https://api.github.com/users/SamanthaNguyen/repos","events_url":"https://api.github.com/users/SamanthaNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/SamanthaNguyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord","description":"Discord is a MediaWiki extension that registers a parser tag for embedding a Discord widget.","fork":false,"url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord","forks_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/forks","keys_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/teams","hooks_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/hooks","issue_events_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/events{/number}","events_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/events","assignees_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/assignees{/user}","branches_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/branches{/branch}","tags_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/tags","blobs_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/statuses/{sha}","languages_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/languages","stargazers_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/stargazers","contributors_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/contributors","subscribers_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/subscribers","subscription_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/subscription","commits_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/contents/{+path}","compare_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/merges","archive_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/downloads","issues_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues{/number}","pulls_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls{/number}","milestones_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/milestones{/number}","notifications_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/labels{/name}","releases_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/releases{/id}","deployments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/deployments","created_at":"2017-03-14T00:02:45Z","updated_at":"2017-03-14T00:14:51Z","pushed_at":"2017-03-19T17:49:18Z","git_url":"git://github.com/SamanthaNguyen/mediawiki-extensions-Discord.git","ssh_url":"git@github.com:SamanthaNguyen/mediawiki-extensions-Discord.git","clone_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord.git","svn_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord","homepage":"","size":27,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SamanthaNguyen:master","ref":"master","sha":"2bd27bff2c0042fa66de9203007c1fca176a2499","user":{"login":"SamanthaNguyen","id":4723983,"avatar_url":"https://avatars0.githubusercontent.com/u/4723983?v=3","gravatar_id":"","url":"https://api.github.com/users/SamanthaNguyen","html_url":"https://github.com/SamanthaNguyen","followers_url":"https://api.github.com/users/SamanthaNguyen/followers","following_url":"https://api.github.com/users/SamanthaNguyen/following{/other_user}","gists_url":"https://api.github.com/users/SamanthaNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/SamanthaNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamanthaNguyen/subscriptions","organizations_url":"https://api.github.com/users/SamanthaNguyen/orgs","repos_url":"https://api.github.com/users/SamanthaNguyen/repos","events_url":"https://api.github.com/users/SamanthaNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/SamanthaNguyen/received_events","type":"User","site_admin":false},"repo":{"id":84886246,"name":"mediawiki-extensions-Discord","full_name":"SamanthaNguyen/mediawiki-extensions-Discord","owner":{"login":"SamanthaNguyen","id":4723983,"avatar_url":"https://avatars0.githubusercontent.com/u/4723983?v=3","gravatar_id":"","url":"https://api.github.com/users/SamanthaNguyen","html_url":"https://github.com/SamanthaNguyen","followers_url":"https://api.github.com/users/SamanthaNguyen/followers","following_url":"https://api.github.com/users/SamanthaNguyen/following{/other_user}","gists_url":"https://api.github.com/users/SamanthaNguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/SamanthaNguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamanthaNguyen/subscriptions","organizations_url":"https://api.github.com/users/SamanthaNguyen/orgs","repos_url":"https://api.github.com/users/SamanthaNguyen/repos","events_url":"https://api.github.com/users/SamanthaNguyen/events{/privacy}","received_events_url":"https://api.github.com/users/SamanthaNguyen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord","description":"Discord is a MediaWiki extension that registers a parser tag for embedding a Discord widget.","fork":false,"url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord","forks_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/forks","keys_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/teams","hooks_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/hooks","issue_events_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/events{/number}","events_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/events","assignees_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/assignees{/user}","branches_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/branches{/branch}","tags_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/tags","blobs_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/refs{/sha}","trees_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/statuses/{sha}","languages_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/languages","stargazers_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/stargazers","contributors_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/contributors","subscribers_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/subscribers","subscription_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/subscription","commits_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/commits{/sha}","git_commits_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/git/commits{/sha}","comments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/comments{/number}","issue_comment_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/comments{/number}","contents_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/contents/{+path}","compare_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/merges","archive_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/downloads","issues_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues{/number}","pulls_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls{/number}","milestones_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/milestones{/number}","notifications_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/labels{/name}","releases_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/releases{/id}","deployments_url":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/deployments","created_at":"2017-03-14T00:02:45Z","updated_at":"2017-03-14T00:14:51Z","pushed_at":"2017-03-19T17:49:18Z","git_url":"git://github.com/SamanthaNguyen/mediawiki-extensions-Discord.git","ssh_url":"git@github.com:SamanthaNguyen/mediawiki-extensions-Discord.git","clone_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord.git","svn_url":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord","homepage":"","size":27,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2"},"html":{"href":"https://github.com/SamanthaNguyen/mediawiki-extensions-Discord/pull/2"},"issue":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/2"},"comments":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/SamanthaNguyen/mediawiki-extensions-Discord/statuses/de7c8174d5dbe37bcc96556da5689d6c51b90878"}}}}
{"actor":{"display_login":"mary-kate"}}