Commit: ba8818420ba2a1be12601459f59ba9eddfaa9667 Author: Johannes Schlüter <johan...@schlueters.de> Wed, 8 May 2013 10:31:41 +0200 Parents: 239016adc19a96b60d26bb0442cfd167a0776b18 Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=ba8818420ba2a1be12601459f59ba9eddfaa9667 Log: Fix logging error Changed paths: M pulls/api.php Diff: diff --git a/pulls/api.php b/pulls/api.php index e8d49c9..e1d72cd 100644 --- a/pulls/api.php +++ b/pulls/api.php @@ -185,13 +185,15 @@ function ghupdate() $pull = $pull_raw ? json_decode($pull_raw) : false; if (!$pull || empty($pull['state'])) { header('HTTP/1.0 400 Bad Request'); - $_SESSION['debug'][] = array( - "message" => "Request to GitHub failed", - "url" => $url, - "http response" => $http_response_header, - "response" => $pull_raw, - "json error" => json_last_error() - ); + if (isset($_SESSION['debug']['requests'])) { + $_SESSION['debug']['requests'][] = array( + "message" => "Request to GitHub failed", + "url" => $url, + "http response" => $http_response_header, + "response" => $pull_raw, + "json error" => json_last_error() + ); + } die(json_encode(array('success' => false, 'errors' => array("Failed to get data from GitHub", "http" => $http_response_header, "json" => json_last_error())))); } -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php