{"action":"created","comment":{"url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/comments/68810233","id":68810233,"diff_hunk":"@@ -456,20 +455,20 @@ function send_request ( $nprml, $post_ID ) {\n                         $response_xml = simplexml_load_string( $body );\n                         $error_text .= '  API Error Message = ' . $response_xml->message->text;\n                     }\n-                    error_log('Error returned from API ' . $error_text);\n+                    error_log('Error returned from NPR Story API with status code other than 200 OK: ' . $error_text); // debug use\n                 }\n             } else {\n-                $error_text = 'WP Error returned from sending story with post_id = '. $post_ID .' for url='.$url . ' to API ='. $result->get_error_message();\n-                error_log($error_text);\n+                $error_text = 'WP_Error returned when sending story with post_ID ' . $post_ID . ' for url ' . $url . ' to NPR Story API:'. $result->get_error_message();\n+                error_log( $error_text ); // debug use","path":"classes/NPRAPIWordpress.php","position":66,"original_position":66,"commit_id":"658361d35f0acdc7353726813b7e053d7585ba32","original_commit_id":"658361d35f0acdc7353726813b7e053d7585ba32","user":{"login":"aschweigert","id":490703,"avatar_url":"https://avatars.githubusercontent.com/u/490703?v=3","gravatar_id":"","url":"https://api.github.com/users/aschweigert","html_url":"https://github.com/aschweigert","followers_url":"https://api.github.com/users/aschweigert/followers","following_url":"https://api.github.com/users/aschweigert/following{/other_user}","gists_url":"https://api.github.com/users/aschweigert/gists{/gist_id}","starred_url":"https://api.github.com/users/aschweigert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschweigert/subscriptions","organizations_url":"https://api.github.com/users/aschweigert/orgs","repos_url":"https://api.github.com/users/aschweigert/repos","events_url":"https://api.github.com/users/aschweigert/events{/privacy}","received_events_url":"https://api.github.com/users/aschweigert/received_events","type":"User","site_admin":false},"body":"same here","created_at":"2016-06-28T18:05:09Z","updated_at":"2016-06-28T18:05:10Z","html_url":"https://github.com/nprds/nprapi-wordpress/pull/27#discussion_r68810233","pull_request_url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/comments/68810233"},"html":{"href":"https://github.com/nprds/nprapi-wordpress/pull/27#discussion_r68810233"},"pull_request":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27","id":75522067,"html_url":"https://github.com/nprds/nprapi-wordpress/pull/27","diff_url":"https://github.com/nprds/nprapi-wordpress/pull/27.diff","patch_url":"https://github.com/nprds/nprapi-wordpress/pull/27.patch","issue_url":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/27","number":27,"state":"open","locked":false,"title":"Remove a collection of unnecessary error_logs, fix \"cannot modify header information\"","user":{"login":"benlk","id":1754187,"avatar_url":"https://avatars.githubusercontent.com/u/1754187?v=3","gravatar_id":"","url":"https://api.github.com/users/benlk","html_url":"https://github.com/benlk","followers_url":"https://api.github.com/users/benlk/followers","following_url":"https://api.github.com/users/benlk/following{/other_user}","gists_url":"https://api.github.com/users/benlk/gists{/gist_id}","starred_url":"https://api.github.com/users/benlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlk/subscriptions","organizations_url":"https://api.github.com/users/benlk/orgs","repos_url":"https://api.github.com/users/benlk/repos","events_url":"https://api.github.com/users/benlk/events{/privacy}","received_events_url":"https://api.github.com/users/benlk/received_events","type":"User","site_admin":false},"body":"## Changes\r\n\r\n- create new function `nprstory_error_log($input)` that will only run `error_log` on the `$input` if `WP_DEBUG` is True\r\n- change many `error_log`s to use `nprstory_error_log`\r\n- identify `error_log`s that should always fire, because these may be identifying errors in the production environment\r\n- remove trailing `?>` at end of `classes/nprml.php` as it may cause an error on some servers, also to match WordPress style guide: https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#remove-trailing-spaces\r\n\r\n## Why\r\n\r\nAn error reported by @mike-douglas \r\n> Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/plugins/nprapi-wordpress/push_story.php:233) in /var/www/html/wp-includes/pluggable.php on line 1171","created_at":"2016-06-28T17:58:27Z","updated_at":"2016-06-28T18:05:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77cab6e01ed13e53376cd90753a7be55d287aa74","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27/commits","review_comments_url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27/comments","review_comment_url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/27/comments","statuses_url":"https://api.github.com/repos/nprds/nprapi-wordpress/statuses/658361d35f0acdc7353726813b7e053d7585ba32","head":{"label":"INN:master","ref":"master","sha":"658361d35f0acdc7353726813b7e053d7585ba32","user":{"login":"INN","id":1553533,"avatar_url":"https://avatars.githubusercontent.com/u/1553533?v=3","gravatar_id":"","url":"https://api.github.com/users/INN","html_url":"https://github.com/INN","followers_url":"https://api.github.com/users/INN/followers","following_url":"https://api.github.com/users/INN/following{/other_user}","gists_url":"https://api.github.com/users/INN/gists{/gist_id}","starred_url":"https://api.github.com/users/INN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/INN/subscriptions","organizations_url":"https://api.github.com/users/INN/orgs","repos_url":"https://api.github.com/users/INN/repos","events_url":"https://api.github.com/users/INN/events{/privacy}","received_events_url":"https://api.github.com/users/INN/received_events","type":"Organization","site_admin":false},"repo":{"id":60124405,"name":"WP-DS-NPR-API","full_name":"INN/WP-DS-NPR-API","owner":{"login":"INN","id":1553533,"avatar_url":"https://avatars.githubusercontent.com/u/1553533?v=3","gravatar_id":"","url":"https://api.github.com/users/INN","html_url":"https://github.com/INN","followers_url":"https://api.github.com/users/INN/followers","following_url":"https://api.github.com/users/INN/following{/other_user}","gists_url":"https://api.github.com/users/INN/gists{/gist_id}","starred_url":"https://api.github.com/users/INN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/INN/subscriptions","organizations_url":"https://api.github.com/users/INN/orgs","repos_url":"https://api.github.com/users/INN/repos","events_url":"https://api.github.com/users/INN/events{/privacy}","received_events_url":"https://api.github.com/users/INN/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/INN/WP-DS-NPR-API","description":"","fork":true,"url":"https://api.github.com/repos/INN/WP-DS-NPR-API","forks_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/forks","keys_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/keys{/key_id}","collaborators_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/teams","hooks_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/hooks","issue_events_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/issues/events{/number}","events_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/events","assignees_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/assignees{/user}","branches_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/branches{/branch}","tags_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/tags","blobs_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/git/refs{/sha}","trees_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/git/trees{/sha}","statuses_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/statuses/{sha}","languages_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/languages","stargazers_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/stargazers","contributors_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/contributors","subscribers_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/subscribers","subscription_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/subscription","commits_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/commits{/sha}","git_commits_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/git/commits{/sha}","comments_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/comments{/number}","issue_comment_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/issues/comments{/number}","contents_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/contents/{+path}","compare_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/compare/{base}...{head}","merges_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/merges","archive_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/downloads","issues_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/issues{/number}","pulls_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/pulls{/number}","milestones_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/milestones{/number}","notifications_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/labels{/name}","releases_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/releases{/id}","deployments_url":"https://api.github.com/repos/INN/WP-DS-NPR-API/deployments","created_at":"2016-05-31T21:22:56Z","updated_at":"2016-06-07T01:37:06Z","pushed_at":"2016-06-28T18:04:01Z","git_url":"git://github.com/INN/WP-DS-NPR-API.git","ssh_url":"git@github.com:INN/WP-DS-NPR-API.git","clone_url":"https://github.com/INN/WP-DS-NPR-API.git","svn_url":"https://github.com/INN/WP-DS-NPR-API","homepage":null,"size":8332,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nprds:master","ref":"master","sha":"e84d1d821ad6caa12302a0dc239277707466e7de","user":{"login":"nprds","id":3236417,"avatar_url":"https://avatars.githubusercontent.com/u/3236417?v=3","gravatar_id":"","url":"https://api.github.com/users/nprds","html_url":"https://github.com/nprds","followers_url":"https://api.github.com/users/nprds/followers","following_url":"https://api.github.com/users/nprds/following{/other_user}","gists_url":"https://api.github.com/users/nprds/gists{/gist_id}","starred_url":"https://api.github.com/users/nprds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nprds/subscriptions","organizations_url":"https://api.github.com/users/nprds/orgs","repos_url":"https://api.github.com/users/nprds/repos","events_url":"https://api.github.com/users/nprds/events{/privacy}","received_events_url":"https://api.github.com/users/nprds/received_events","type":"Organization","site_admin":false},"repo":{"id":4704477,"name":"nprapi-wordpress","full_name":"nprds/nprapi-wordpress","owner":{"login":"nprds","id":3236417,"avatar_url":"https://avatars.githubusercontent.com/u/3236417?v=3","gravatar_id":"","url":"https://api.github.com/users/nprds","html_url":"https://github.com/nprds","followers_url":"https://api.github.com/users/nprds/followers","following_url":"https://api.github.com/users/nprds/following{/other_user}","gists_url":"https://api.github.com/users/nprds/gists{/gist_id}","starred_url":"https://api.github.com/users/nprds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nprds/subscriptions","organizations_url":"https://api.github.com/users/nprds/orgs","repos_url":"https://api.github.com/users/nprds/repos","events_url":"https://api.github.com/users/nprds/events{/privacy}","received_events_url":"https://api.github.com/users/nprds/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nprds/nprapi-wordpress","description":"Access the NPR API from within Wordpress","fork":false,"url":"https://api.github.com/repos/nprds/nprapi-wordpress","forks_url":"https://api.github.com/repos/nprds/nprapi-wordpress/forks","keys_url":"https://api.github.com/repos/nprds/nprapi-wordpress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nprds/nprapi-wordpress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nprds/nprapi-wordpress/teams","hooks_url":"https://api.github.com/repos/nprds/nprapi-wordpress/hooks","issue_events_url":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/events{/number}","events_url":"https://api.github.com/repos/nprds/nprapi-wordpress/events","assignees_url":"https://api.github.com/repos/nprds/nprapi-wordpress/assignees{/user}","branches_url":"https://api.github.com/repos/nprds/nprapi-wordpress/branches{/branch}","tags_url":"https://api.github.com/repos/nprds/nprapi-wordpress/tags","blobs_url":"https://api.github.com/repos/nprds/nprapi-wordpress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nprds/nprapi-wordpress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nprds/nprapi-wordpress/git/refs{/sha}","trees_url":"https://api.github.com/repos/nprds/nprapi-wordpress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nprds/nprapi-wordpress/statuses/{sha}","languages_url":"https://api.github.com/repos/nprds/nprapi-wordpress/languages","stargazers_url":"https://api.github.com/repos/nprds/nprapi-wordpress/stargazers","contributors_url":"https://api.github.com/repos/nprds/nprapi-wordpress/contributors","subscribers_url":"https://api.github.com/repos/nprds/nprapi-wordpress/subscribers","subscription_url":"https://api.github.com/repos/nprds/nprapi-wordpress/subscription","commits_url":"https://api.github.com/repos/nprds/nprapi-wordpress/commits{/sha}","git_commits_url":"https://api.github.com/repos/nprds/nprapi-wordpress/git/commits{/sha}","comments_url":"https://api.github.com/repos/nprds/nprapi-wordpress/comments{/number}","issue_comment_url":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/comments{/number}","contents_url":"https://api.github.com/repos/nprds/nprapi-wordpress/contents/{+path}","compare_url":"https://api.github.com/repos/nprds/nprapi-wordpress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nprds/nprapi-wordpress/merges","archive_url":"https://api.github.com/repos/nprds/nprapi-wordpress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nprds/nprapi-wordpress/downloads","issues_url":"https://api.github.com/repos/nprds/nprapi-wordpress/issues{/number}","pulls_url":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls{/number}","milestones_url":"https://api.github.com/repos/nprds/nprapi-wordpress/milestones{/number}","notifications_url":"https://api.github.com/repos/nprds/nprapi-wordpress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nprds/nprapi-wordpress/labels{/name}","releases_url":"https://api.github.com/repos/nprds/nprapi-wordpress/releases{/id}","deployments_url":"https://api.github.com/repos/nprds/nprapi-wordpress/deployments","created_at":"2012-06-18T18:19:45Z","updated_at":"2016-06-10T14:01:38Z","pushed_at":"2016-06-28T18:04:01Z","git_url":"git://github.com/nprds/nprapi-wordpress.git","ssh_url":"git@github.com:nprds/nprapi-wordpress.git","clone_url":"https://github.com/nprds/nprapi-wordpress.git","svn_url":"https://github.com/nprds/nprapi-wordpress","homepage":"","size":9219,"stargazers_count":8,"watchers_count":8,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":19,"forks":12,"open_issues":19,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27"},"html":{"href":"https://github.com/nprds/nprapi-wordpress/pull/27"},"issue":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/27"},"comments":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/nprds/nprapi-wordpress/statuses/658361d35f0acdc7353726813b7e053d7585ba32"}}}}
{"actor":{"display_login":"aschweigert"}}