{"action":"created","comment":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/122475034","pull_request_review_id":44598380,"id":122475034,"diff_hunk":"@@ -359,7 +371,15 @@ private function scanAddonDirs($type) {\n         foreach ($this->scanDirs[$type] as $subdir) {\n             $paths = glob(PATH_ROOT.\"$subdir/*\", GLOB_ONLYDIR | GLOB_NOSORT);\n             foreach ($paths as $path) {\n-                $result[basename($path)] = substr($path, $strlen);\n+                $basename = basename($path);\n+                if (!array_key_exists($basename, $result)) {\n+                    $result[basename($path)] = substr($path, $strlen);","path":"library/Vanilla/AddonManager.php","position":45,"original_position":45,"commit_id":"136a4a6d16fad4f6026acfd698c9036b82fe01d3","original_commit_id":"136a4a6d16fad4f6026acfd698c9036b82fe01d3","user":{"login":"evach-vf","id":15455914,"avatar_url":"https://avatars1.githubusercontent.com/u/15455914?v=3","gravatar_id":"","url":"https://api.github.com/users/evach-vf","html_url":"https://github.com/evach-vf","followers_url":"https://api.github.com/users/evach-vf/followers","following_url":"https://api.github.com/users/evach-vf/following{/other_user}","gists_url":"https://api.github.com/users/evach-vf/gists{/gist_id}","starred_url":"https://api.github.com/users/evach-vf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evach-vf/subscriptions","organizations_url":"https://api.github.com/users/evach-vf/orgs","repos_url":"https://api.github.com/users/evach-vf/repos","events_url":"https://api.github.com/users/evach-vf/events{/privacy}","received_events_url":"https://api.github.com/users/evach-vf/received_events","type":"User","site_admin":false},"body":"$result[$basename] = substr($path, $strlen);\r\ninstead of \r\n$result[basename($path)] = substr($path, $strlen);\r\n","created_at":"2017-06-16T15:56:24Z","updated_at":"2017-06-16T15:58:41Z","html_url":"https://github.com/vanilla/vanilla/pull/5672#discussion_r122475034","pull_request_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5672","_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/122475034"},"html":{"href":"https://github.com/vanilla/vanilla/pull/5672#discussion_r122475034"},"pull_request":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5672"}}},"pull_request":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/5672","id":125896743,"html_url":"https://github.com/vanilla/vanilla/pull/5672","diff_url":"https://github.com/vanilla/vanilla/pull/5672.diff","patch_url":"https://github.com/vanilla/vanilla/pull/5672.patch","issue_url":"https://api.github.com/repos/vanilla/vanilla/issues/5672","number":5672,"state":"open","locked":false,"title":"Improve feedback when a duplicate addon key is encountered","user":{"login":"initvector","id":1390241,"avatar_url":"https://avatars3.githubusercontent.com/u/1390241?v=3","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false},"body":"When addons use duplicate directories or keys, there's currently not a lot of feedback to go on for the errors that arise.\r\n\r\nThis update adds some exception throwing to two key areas when addons are scanned. If a duplicately-named addon directory is encountered, an exception is thrown indicating which addon is causing the issue. If a duplicate addon key is encountered, a similar exception is thrown and the error is logged to the database. The directory scan doesn't include logging, because it's done before addons are loaded and hence we cannot count on a logger being available. The addon key scanning is run on addon pages during cache checks, so there's an increased likeliness a logger will be available.\r\n\r\nWe're moving in a directory where an addon is an addon is an addon. Themes, plugins and applications should have globally unique keys and their keys should match their directory names.\r\n\r\nCloses #5053","created_at":"2017-06-15T19:40:50Z","updated_at":"2017-06-16T15:58:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66cec68faffafd87d62e0e5b0a30ae16996f5c57","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/vanilla/vanilla/milestones/56","html_url":"https://github.com/vanilla/vanilla/milestone/56","labels_url":"https://api.github.com/repos/vanilla/vanilla/milestones/56/labels","id":2171243,"number":56,"title":"2017-Q2-6","description":"","creator":{"login":"linc","id":117672,"avatar_url":"https://avatars2.githubusercontent.com/u/117672?v=3","gravatar_id":"","url":"https://api.github.com/users/linc","html_url":"https://github.com/linc","followers_url":"https://api.github.com/users/linc/followers","following_url":"https://api.github.com/users/linc/following{/other_user}","gists_url":"https://api.github.com/users/linc/gists{/gist_id}","starred_url":"https://api.github.com/users/linc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linc/subscriptions","organizations_url":"https://api.github.com/users/linc/orgs","repos_url":"https://api.github.com/users/linc/repos","events_url":"https://api.github.com/users/linc/events{/privacy}","received_events_url":"https://api.github.com/users/linc/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":25,"state":"open","created_at":"2016-12-02T14:22:10Z","updated_at":"2017-06-16T14:58:04Z","due_on":"2017-06-17T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5672/commits","review_comments_url":"https://api.github.com/repos/vanilla/vanilla/pulls/5672/comments","review_comment_url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/5672/comments","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/136a4a6d16fad4f6026acfd698c9036b82fe01d3","head":{"label":"vanilla:fix/duplicate-addon-feedback","ref":"fix/duplicate-addon-feedback","sha":"136a4a6d16fad4f6026acfd698c9036b82fe01d3","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2017-06-15T17:44:10Z","pushed_at":"2017-06-16T15:48:17Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":50731,"stargazers_count":1661,"watchers_count":1661,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":617,"mirror_url":null,"open_issues_count":446,"forks":617,"open_issues":446,"watchers":1661,"default_branch":"master"}},"base":{"label":"vanilla:master","ref":"master","sha":"0d04ec34323f3a3a2618f98734403431abae62f9","user":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"avatar_url":"https://avatars2.githubusercontent.com/u/7443552?v=3","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2017-06-15T17:44:10Z","pushed_at":"2017-06-16T15:48:17Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":50731,"stargazers_count":1661,"watchers_count":1661,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":617,"mirror_url":null,"open_issues_count":446,"forks":617,"open_issues":446,"watchers":1661,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5672"},"html":{"href":"https://github.com/vanilla/vanilla/pull/5672"},"issue":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/5672"},"comments":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/5672/comments"},"review_comments":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5672/comments"},"review_comment":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/5672/commits"},"statuses":{"href":"https://api.github.com/repos/vanilla/vanilla/statuses/136a4a6d16fad4f6026acfd698c9036b82fe01d3"}}}}
{"actor":{"display_login":"evach-vf"}}