{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/26739237","id":26739237,"diff_hunk":"@@ -235,8 +235,17 @@ function startup()\n     */\n     function initialize()\n     {\n-        if( ob_get_length() != 0 )\n-            ob_end_clean();\n+        try\n+        {\n+            ezpKernel::instance();","path":"kernel/classes/ezscript.php","position":8,"original_position":8,"commit_id":"16b1422bc4a45003baf8c73392cbf6f0061ec25d","original_commit_id":"16b1422bc4a45003baf8c73392cbf6f0061ec25d","user":{"login":"glye","id":289744,"avatar_url":"https://avatars.githubusercontent.com/u/289744?v=3","gravatar_id":"","url":"https://api.github.com/users/glye","html_url":"https://github.com/glye","followers_url":"https://api.github.com/users/glye/followers","following_url":"https://api.github.com/users/glye/following{/other_user}","gists_url":"https://api.github.com/users/glye/gists{/gist_id}","starred_url":"https://api.github.com/users/glye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glye/subscriptions","organizations_url":"https://api.github.com/users/glye/orgs","repos_url":"https://api.github.com/users/glye/repos","events_url":"https://api.github.com/users/glye/events{/privacy}","received_events_url":"https://api.github.com/users/glye/received_events","type":"User","site_admin":false},"body":"Hm, maybe it won't. I grabbed this from https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/private/classes/ezpcontentpublishingprocess.php#L174 without really understanding it. Do we have a test for what I'm trying to do here?","created_at":"2015-03-19T09:33:01Z","updated_at":"2015-03-19T09:33:01Z","html_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1150#discussion_r26739237","pull_request_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments/26739237"},"html":{"href":"https://github.com/ezsystems/ezpublish-legacy/pull/1150#discussion_r26739237"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150","id":31444272,"html_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1150","diff_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1150.diff","patch_url":"https://github.com/ezsystems/ezpublish-legacy/pull/1150.patch","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1150","number":1150,"state":"open","locked":false,"title":"Fix EZP-24135: Output buffer gets cleared after legacy call","user":{"login":"glye","id":289744,"avatar_url":"https://avatars.githubusercontent.com/u/289744?v=3","gravatar_id":"","url":"https://api.github.com/users/glye","html_url":"https://github.com/glye","followers_url":"https://api.github.com/users/glye/followers","following_url":"https://api.github.com/users/glye/following{/other_user}","gists_url":"https://api.github.com/users/glye/gists{/gist_id}","starred_url":"https://api.github.com/users/glye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glye/subscriptions","organizations_url":"https://api.github.com/users/glye/orgs","repos_url":"https://api.github.com/users/glye/repos","events_url":"https://api.github.com/users/glye/events{/privacy}","received_events_url":"https://api.github.com/users/glye/received_events","type":"User","site_admin":false},"body":"Dirty trick to see if we are in legacy context, do ob_end_clean only when we are. Seems to work.\r\n\r\nhttps://jira.ez.no/browse/EZP-24135","created_at":"2015-03-18T16:10:27Z","updated_at":"2015-03-19T09:33:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b5627beb0c594d84fbeaf6a02480e463bc3afcb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150/commits","review_comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150/comments","review_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1150/comments","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/16b1422bc4a45003baf8c73392cbf6f0061ec25d","head":{"label":"glye:ezp-24135_output_buffer_cleared_legacy_call","ref":"ezp-24135_output_buffer_cleared_legacy_call","sha":"16b1422bc4a45003baf8c73392cbf6f0061ec25d","user":{"login":"glye","id":289744,"avatar_url":"https://avatars.githubusercontent.com/u/289744?v=3","gravatar_id":"","url":"https://api.github.com/users/glye","html_url":"https://github.com/glye","followers_url":"https://api.github.com/users/glye/followers","following_url":"https://api.github.com/users/glye/following{/other_user}","gists_url":"https://api.github.com/users/glye/gists{/gist_id}","starred_url":"https://api.github.com/users/glye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glye/subscriptions","organizations_url":"https://api.github.com/users/glye/orgs","repos_url":"https://api.github.com/users/glye/repos","events_url":"https://api.github.com/users/glye/events{/privacy}","received_events_url":"https://api.github.com/users/glye/received_events","type":"User","site_admin":false},"repo":{"id":14014638,"name":"ezpublish-legacy","full_name":"glye/ezpublish-legacy","owner":{"login":"glye","id":289744,"avatar_url":"https://avatars.githubusercontent.com/u/289744?v=3","gravatar_id":"","url":"https://api.github.com/users/glye","html_url":"https://github.com/glye","followers_url":"https://api.github.com/users/glye/followers","following_url":"https://api.github.com/users/glye/following{/other_user}","gists_url":"https://api.github.com/users/glye/gists{/gist_id}","starred_url":"https://api.github.com/users/glye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glye/subscriptions","organizations_url":"https://api.github.com/users/glye/orgs","repos_url":"https://api.github.com/users/glye/repos","events_url":"https://api.github.com/users/glye/events{/privacy}","received_events_url":"https://api.github.com/users/glye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glye/ezpublish-legacy","description":"eZ Publish","fork":true,"url":"https://api.github.com/repos/glye/ezpublish-legacy","forks_url":"https://api.github.com/repos/glye/ezpublish-legacy/forks","keys_url":"https://api.github.com/repos/glye/ezpublish-legacy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glye/ezpublish-legacy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glye/ezpublish-legacy/teams","hooks_url":"https://api.github.com/repos/glye/ezpublish-legacy/hooks","issue_events_url":"https://api.github.com/repos/glye/ezpublish-legacy/issues/events{/number}","events_url":"https://api.github.com/repos/glye/ezpublish-legacy/events","assignees_url":"https://api.github.com/repos/glye/ezpublish-legacy/assignees{/user}","branches_url":"https://api.github.com/repos/glye/ezpublish-legacy/branches{/branch}","tags_url":"https://api.github.com/repos/glye/ezpublish-legacy/tags","blobs_url":"https://api.github.com/repos/glye/ezpublish-legacy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glye/ezpublish-legacy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glye/ezpublish-legacy/git/refs{/sha}","trees_url":"https://api.github.com/repos/glye/ezpublish-legacy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glye/ezpublish-legacy/statuses/{sha}","languages_url":"https://api.github.com/repos/glye/ezpublish-legacy/languages","stargazers_url":"https://api.github.com/repos/glye/ezpublish-legacy/stargazers","contributors_url":"https://api.github.com/repos/glye/ezpublish-legacy/contributors","subscribers_url":"https://api.github.com/repos/glye/ezpublish-legacy/subscribers","subscription_url":"https://api.github.com/repos/glye/ezpublish-legacy/subscription","commits_url":"https://api.github.com/repos/glye/ezpublish-legacy/commits{/sha}","git_commits_url":"https://api.github.com/repos/glye/ezpublish-legacy/git/commits{/sha}","comments_url":"https://api.github.com/repos/glye/ezpublish-legacy/comments{/number}","issue_comment_url":"https://api.github.com/repos/glye/ezpublish-legacy/issues/comments{/number}","contents_url":"https://api.github.com/repos/glye/ezpublish-legacy/contents/{+path}","compare_url":"https://api.github.com/repos/glye/ezpublish-legacy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glye/ezpublish-legacy/merges","archive_url":"https://api.github.com/repos/glye/ezpublish-legacy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glye/ezpublish-legacy/downloads","issues_url":"https://api.github.com/repos/glye/ezpublish-legacy/issues{/number}","pulls_url":"https://api.github.com/repos/glye/ezpublish-legacy/pulls{/number}","milestones_url":"https://api.github.com/repos/glye/ezpublish-legacy/milestones{/number}","notifications_url":"https://api.github.com/repos/glye/ezpublish-legacy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glye/ezpublish-legacy/labels{/name}","releases_url":"https://api.github.com/repos/glye/ezpublish-legacy/releases{/id}","created_at":"2013-10-31T11:06:41Z","updated_at":"2015-03-16T16:10:36Z","pushed_at":"2015-03-18T16:07:29Z","git_url":"git://github.com/glye/ezpublish-legacy.git","ssh_url":"git@github.com:glye/ezpublish-legacy.git","clone_url":"https://github.com/glye/ezpublish-legacy.git","svn_url":"https://github.com/glye/ezpublish-legacy","homepage":"http://ez.no/Products/","size":207898,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"f3d39eea6b0bbaf27888c02a3ee64be24f0d9209","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":715911,"name":"ezpublish-legacy","full_name":"ezsystems/ezpublish-legacy","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/ezpublish-legacy","description":"eZ Publish","fork":false,"url":"https://api.github.com/repos/ezsystems/ezpublish-legacy","forks_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/forks","keys_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/teams","hooks_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/events","assignees_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/tags","blobs_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/languages","stargazers_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/subscription","commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/merges","archive_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/downloads","issues_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/ezpublish-legacy/releases{/id}","created_at":"2010-06-11T15:47:13Z","updated_at":"2015-03-16T11:00:01Z","pushed_at":"2015-03-16T10:59:45Z","git_url":"git://github.com/ezsystems/ezpublish-legacy.git","ssh_url":"git@github.com:ezsystems/ezpublish-legacy.git","clone_url":"https://github.com/ezsystems/ezpublish-legacy.git","svn_url":"https://github.com/ezsystems/ezpublish-legacy","homepage":"http://ez.no/Products/","size":315663,"stargazers_count":261,"watchers_count":261,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":218,"mirror_url":null,"open_issues_count":153,"forks":218,"open_issues":153,"watchers":261,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150"},"html":{"href":"https://github.com/ezsystems/ezpublish-legacy/pull/1150"},"issue":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1150"},"comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/issues/1150/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/pulls/1150/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/ezpublish-legacy/statuses/16b1422bc4a45003baf8c73392cbf6f0061ec25d"}}}}