{"action":"created","comment":{"url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/comments/27292809","id":27292809,"diff_hunk":"@@ -8,32 +8,32 @@\n  * Redirects the browser to a specified location. Safer than using a\n  * direct header() call\n  *\n- *  @param string $url\n+ *  @param string $location\n+ *  @param string $status (optional)\n  */\n-function redirect ($url)\n+function redirect($location, $status = '302 Found')\n {\n-    // Just make sure.\n-    $url = str_replace('Location:', null, $url);\n-\n     if (headers_sent($filename, $line)) {\n-        echo \"<h1>Error: Cannot redirect to <a href=\\\"$url\\\">$url</a></h1><p>Output has already started in $filename on line $line</p>\";\n-        exit;\n-    }\n \n-    // convert idn back to ascii for redirect\n+        // throw exception if headers already sent","path":"symphony/lib/boot/func.utilities.php","position":20,"original_position":20,"commit_id":"8dc0a52a1438ddcc5476bdc0e3e9cd4c84dd2ffe","original_commit_id":"8dc0a52a1438ddcc5476bdc0e3e9cd4c84dd2ffe","user":{"login":"michael-e","id":40072,"avatar_url":"https://avatars.githubusercontent.com/u/40072?v=3","gravatar_id":"","url":"https://api.github.com/users/michael-e","html_url":"https://github.com/michael-e","followers_url":"https://api.github.com/users/michael-e/followers","following_url":"https://api.github.com/users/michael-e/following{/other_user}","gists_url":"https://api.github.com/users/michael-e/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-e/subscriptions","organizations_url":"https://api.github.com/users/michael-e/orgs","repos_url":"https://api.github.com/users/michael-e/repos","events_url":"https://api.github.com/users/michael-e/events{/privacy}","received_events_url":"https://api.github.com/users/michael-e/received_events","type":"User","site_admin":false},"body":"Both green blocks, I guess.","created_at":"2015-03-27T13:05:55Z","updated_at":"2015-03-27T13:05:55Z","html_url":"https://github.com/symphonycms/symphony-2/pull/2395#discussion_r27292809","pull_request_url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395","_links":{"self":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/comments/27292809"},"html":{"href":"https://github.com/symphonycms/symphony-2/pull/2395#discussion_r27292809"},"pull_request":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395"}}},"pull_request":{"url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395","id":32055870,"html_url":"https://github.com/symphonycms/symphony-2/pull/2395","diff_url":"https://github.com/symphonycms/symphony-2/pull/2395.diff","patch_url":"https://github.com/symphonycms/symphony-2/pull/2395.patch","issue_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2395","number":2395,"state":"open","locked":false,"title":"Improved redirect function","user":{"login":"jensscherbl","id":1640033,"avatar_url":"https://avatars.githubusercontent.com/u/1640033?v=3","gravatar_id":"","url":"https://api.github.com/users/jensscherbl","html_url":"https://github.com/jensscherbl","followers_url":"https://api.github.com/users/jensscherbl/followers","following_url":"https://api.github.com/users/jensscherbl/following{/other_user}","gists_url":"https://api.github.com/users/jensscherbl/gists{/gist_id}","starred_url":"https://api.github.com/users/jensscherbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensscherbl/subscriptions","organizations_url":"https://api.github.com/users/jensscherbl/orgs","repos_url":"https://api.github.com/users/jensscherbl/repos","events_url":"https://api.github.com/users/jensscherbl/events{/privacy}","received_events_url":"https://api.github.com/users/jensscherbl/received_events","type":"User","site_admin":false},"body":"- Use `SymphonyErrorPage ` exception for nicer error message if headers already sent.\r\n- Simplified idn to ascii conversion.\r\n- Introduced optional `$status` parameter, so developers can use other status codes like [`303 See Other`][1] or `307 Temporary Redirect`.\r\n- Removed caching headers. For redirects, the [status code already indicates the appropriate caching behavior][2].\r\n\r\n[1]: http://en.wikipedia.org/wiki/HTTP_303\r\n[2]: https://tools.ietf.org/html/rfc2616#section-10.3","created_at":"2015-03-26T20:14:44Z","updated_at":"2015-03-27T13:05:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47ef61139b6dd7ab98d13c68f43f2edb91611967","assignee":{"login":"jensscherbl","id":1640033,"avatar_url":"https://avatars.githubusercontent.com/u/1640033?v=3","gravatar_id":"","url":"https://api.github.com/users/jensscherbl","html_url":"https://github.com/jensscherbl","followers_url":"https://api.github.com/users/jensscherbl/followers","following_url":"https://api.github.com/users/jensscherbl/following{/other_user}","gists_url":"https://api.github.com/users/jensscherbl/gists{/gist_id}","starred_url":"https://api.github.com/users/jensscherbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensscherbl/subscriptions","organizations_url":"https://api.github.com/users/jensscherbl/orgs","repos_url":"https://api.github.com/users/jensscherbl/repos","events_url":"https://api.github.com/users/jensscherbl/events{/privacy}","received_events_url":"https://api.github.com/users/jensscherbl/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/19","html_url":"https://github.com/symphonycms/symphony-2/milestones/3.0.0","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/19/labels","id":736848,"number":19,"title":"3.0.0","description":"","creator":{"login":"brendo","id":69268,"avatar_url":"https://avatars.githubusercontent.com/u/69268?v=3","gravatar_id":"","url":"https://api.github.com/users/brendo","html_url":"https://github.com/brendo","followers_url":"https://api.github.com/users/brendo/followers","following_url":"https://api.github.com/users/brendo/following{/other_user}","gists_url":"https://api.github.com/users/brendo/gists{/gist_id}","starred_url":"https://api.github.com/users/brendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendo/subscriptions","organizations_url":"https://api.github.com/users/brendo/orgs","repos_url":"https://api.github.com/users/brendo/repos","events_url":"https://api.github.com/users/brendo/events{/privacy}","received_events_url":"https://api.github.com/users/brendo/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":7,"state":"open","created_at":"2014-07-30T10:51:47Z","updated_at":"2015-03-26T20:14:55Z","due_on":"2015-05-13T14:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395/commits","review_comments_url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395/comments","review_comment_url":"https://api.github.com/repos/symphonycms/symphony-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2395/comments","statuses_url":"https://api.github.com/repos/symphonycms/symphony-2/statuses/8dc0a52a1438ddcc5476bdc0e3e9cd4c84dd2ffe","head":{"label":"jensscherbl:redirect","ref":"redirect","sha":"8dc0a52a1438ddcc5476bdc0e3e9cd4c84dd2ffe","user":{"login":"jensscherbl","id":1640033,"avatar_url":"https://avatars.githubusercontent.com/u/1640033?v=3","gravatar_id":"","url":"https://api.github.com/users/jensscherbl","html_url":"https://github.com/jensscherbl","followers_url":"https://api.github.com/users/jensscherbl/followers","following_url":"https://api.github.com/users/jensscherbl/following{/other_user}","gists_url":"https://api.github.com/users/jensscherbl/gists{/gist_id}","starred_url":"https://api.github.com/users/jensscherbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensscherbl/subscriptions","organizations_url":"https://api.github.com/users/jensscherbl/orgs","repos_url":"https://api.github.com/users/jensscherbl/repos","events_url":"https://api.github.com/users/jensscherbl/events{/privacy}","received_events_url":"https://api.github.com/users/jensscherbl/received_events","type":"User","site_admin":false},"repo":{"id":18126706,"name":"symphony-2","full_name":"jensscherbl/symphony-2","owner":{"login":"jensscherbl","id":1640033,"avatar_url":"https://avatars.githubusercontent.com/u/1640033?v=3","gravatar_id":"","url":"https://api.github.com/users/jensscherbl","html_url":"https://github.com/jensscherbl","followers_url":"https://api.github.com/users/jensscherbl/followers","following_url":"https://api.github.com/users/jensscherbl/following{/other_user}","gists_url":"https://api.github.com/users/jensscherbl/gists{/gist_id}","starred_url":"https://api.github.com/users/jensscherbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensscherbl/subscriptions","organizations_url":"https://api.github.com/users/jensscherbl/orgs","repos_url":"https://api.github.com/users/jensscherbl/repos","events_url":"https://api.github.com/users/jensscherbl/events{/privacy}","received_events_url":"https://api.github.com/users/jensscherbl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jensscherbl/symphony-2","description":"This is the official Symphony 2 repository.","fork":true,"url":"https://api.github.com/repos/jensscherbl/symphony-2","forks_url":"https://api.github.com/repos/jensscherbl/symphony-2/forks","keys_url":"https://api.github.com/repos/jensscherbl/symphony-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jensscherbl/symphony-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jensscherbl/symphony-2/teams","hooks_url":"https://api.github.com/repos/jensscherbl/symphony-2/hooks","issue_events_url":"https://api.github.com/repos/jensscherbl/symphony-2/issues/events{/number}","events_url":"https://api.github.com/repos/jensscherbl/symphony-2/events","assignees_url":"https://api.github.com/repos/jensscherbl/symphony-2/assignees{/user}","branches_url":"https://api.github.com/repos/jensscherbl/symphony-2/branches{/branch}","tags_url":"https://api.github.com/repos/jensscherbl/symphony-2/tags","blobs_url":"https://api.github.com/repos/jensscherbl/symphony-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jensscherbl/symphony-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jensscherbl/symphony-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/jensscherbl/symphony-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jensscherbl/symphony-2/statuses/{sha}","languages_url":"https://api.github.com/repos/jensscherbl/symphony-2/languages","stargazers_url":"https://api.github.com/repos/jensscherbl/symphony-2/stargazers","contributors_url":"https://api.github.com/repos/jensscherbl/symphony-2/contributors","subscribers_url":"https://api.github.com/repos/jensscherbl/symphony-2/subscribers","subscription_url":"https://api.github.com/repos/jensscherbl/symphony-2/subscription","commits_url":"https://api.github.com/repos/jensscherbl/symphony-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/jensscherbl/symphony-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/jensscherbl/symphony-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/jensscherbl/symphony-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/jensscherbl/symphony-2/contents/{+path}","compare_url":"https://api.github.com/repos/jensscherbl/symphony-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jensscherbl/symphony-2/merges","archive_url":"https://api.github.com/repos/jensscherbl/symphony-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jensscherbl/symphony-2/downloads","issues_url":"https://api.github.com/repos/jensscherbl/symphony-2/issues{/number}","pulls_url":"https://api.github.com/repos/jensscherbl/symphony-2/pulls{/number}","milestones_url":"https://api.github.com/repos/jensscherbl/symphony-2/milestones{/number}","notifications_url":"https://api.github.com/repos/jensscherbl/symphony-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jensscherbl/symphony-2/labels{/name}","releases_url":"https://api.github.com/repos/jensscherbl/symphony-2/releases{/id}","created_at":"2014-03-26T04:20:51Z","updated_at":"2015-03-26T19:19:40Z","pushed_at":"2015-03-26T20:23:20Z","git_url":"git://github.com/jensscherbl/symphony-2.git","ssh_url":"git@github.com:jensscherbl/symphony-2.git","clone_url":"https://github.com/jensscherbl/symphony-2.git","svn_url":"https://github.com/jensscherbl/symphony-2","homepage":"http://getsymphony.com","size":15335,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"integration"}},"base":{"label":"symphonycms:integration","ref":"integration","sha":"3ee1502c2aa44f19337a71f0713020edf945cc65","user":{"login":"symphonycms","id":334029,"avatar_url":"https://avatars.githubusercontent.com/u/334029?v=3","gravatar_id":"","url":"https://api.github.com/users/symphonycms","html_url":"https://github.com/symphonycms","followers_url":"https://api.github.com/users/symphonycms/followers","following_url":"https://api.github.com/users/symphonycms/following{/other_user}","gists_url":"https://api.github.com/users/symphonycms/gists{/gist_id}","starred_url":"https://api.github.com/users/symphonycms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symphonycms/subscriptions","organizations_url":"https://api.github.com/users/symphonycms/orgs","repos_url":"https://api.github.com/users/symphonycms/repos","events_url":"https://api.github.com/users/symphonycms/events{/privacy}","received_events_url":"https://api.github.com/users/symphonycms/received_events","type":"Organization","site_admin":false},"repo":{"id":780341,"name":"symphony-2","full_name":"symphonycms/symphony-2","owner":{"login":"symphonycms","id":334029,"avatar_url":"https://avatars.githubusercontent.com/u/334029?v=3","gravatar_id":"","url":"https://api.github.com/users/symphonycms","html_url":"https://github.com/symphonycms","followers_url":"https://api.github.com/users/symphonycms/followers","following_url":"https://api.github.com/users/symphonycms/following{/other_user}","gists_url":"https://api.github.com/users/symphonycms/gists{/gist_id}","starred_url":"https://api.github.com/users/symphonycms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symphonycms/subscriptions","organizations_url":"https://api.github.com/users/symphonycms/orgs","repos_url":"https://api.github.com/users/symphonycms/repos","events_url":"https://api.github.com/users/symphonycms/events{/privacy}","received_events_url":"https://api.github.com/users/symphonycms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symphonycms/symphony-2","description":"This is the official Symphony 2 repository.","fork":false,"url":"https://api.github.com/repos/symphonycms/symphony-2","forks_url":"https://api.github.com/repos/symphonycms/symphony-2/forks","keys_url":"https://api.github.com/repos/symphonycms/symphony-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symphonycms/symphony-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symphonycms/symphony-2/teams","hooks_url":"https://api.github.com/repos/symphonycms/symphony-2/hooks","issue_events_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/events{/number}","events_url":"https://api.github.com/repos/symphonycms/symphony-2/events","assignees_url":"https://api.github.com/repos/symphonycms/symphony-2/assignees{/user}","branches_url":"https://api.github.com/repos/symphonycms/symphony-2/branches{/branch}","tags_url":"https://api.github.com/repos/symphonycms/symphony-2/tags","blobs_url":"https://api.github.com/repos/symphonycms/symphony-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symphonycms/symphony-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symphonycms/symphony-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/symphonycms/symphony-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symphonycms/symphony-2/statuses/{sha}","languages_url":"https://api.github.com/repos/symphonycms/symphony-2/languages","stargazers_url":"https://api.github.com/repos/symphonycms/symphony-2/stargazers","contributors_url":"https://api.github.com/repos/symphonycms/symphony-2/contributors","subscribers_url":"https://api.github.com/repos/symphonycms/symphony-2/subscribers","subscription_url":"https://api.github.com/repos/symphonycms/symphony-2/subscription","commits_url":"https://api.github.com/repos/symphonycms/symphony-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/symphonycms/symphony-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/symphonycms/symphony-2/contents/{+path}","compare_url":"https://api.github.com/repos/symphonycms/symphony-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symphonycms/symphony-2/merges","archive_url":"https://api.github.com/repos/symphonycms/symphony-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symphonycms/symphony-2/downloads","issues_url":"https://api.github.com/repos/symphonycms/symphony-2/issues{/number}","pulls_url":"https://api.github.com/repos/symphonycms/symphony-2/pulls{/number}","milestones_url":"https://api.github.com/repos/symphonycms/symphony-2/milestones{/number}","notifications_url":"https://api.github.com/repos/symphonycms/symphony-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/labels{/name}","releases_url":"https://api.github.com/repos/symphonycms/symphony-2/releases{/id}","created_at":"2010-07-17T11:14:07Z","updated_at":"2015-03-22T10:47:54Z","pushed_at":"2015-03-26T20:23:20Z","git_url":"git://github.com/symphonycms/symphony-2.git","ssh_url":"git@github.com:symphonycms/symphony-2.git","clone_url":"https://github.com/symphonycms/symphony-2.git","svn_url":"https://github.com/symphonycms/symphony-2","homepage":"http://getsymphony.com","size":21419,"stargazers_count":477,"watchers_count":477,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":179,"mirror_url":null,"open_issues_count":64,"forks":179,"open_issues":64,"watchers":477,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395"},"html":{"href":"https://github.com/symphonycms/symphony-2/pull/2395"},"issue":{"href":"https://api.github.com/repos/symphonycms/symphony-2/issues/2395"},"comments":{"href":"https://api.github.com/repos/symphonycms/symphony-2/issues/2395/comments"},"review_comments":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395/comments"},"review_comment":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symphonycms/symphony-2/pulls/2395/commits"},"statuses":{"href":"https://api.github.com/repos/symphonycms/symphony-2/statuses/8dc0a52a1438ddcc5476bdc0e3e9cd4c84dd2ffe"}}}}