From f521e8f38343baca35624291fb0a9968151ac46f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2012 08:40:28 +0530 Subject: [PATCH] Fixed response code validation error --- libraries/joomla/github/issues.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/joomla/github/issues.php b/libraries/joomla/github/issues.php index 97e493795f..470f03e601 100644 --- a/libraries/joomla/github/issues.php +++ b/libraries/joomla/github/issues.php @@ -312,7 +312,7 @@ public function editComment($user, $repo, $commentId, $body) public function editLabel($user, $repo, $label, $name, $color) { // Build the request path. - $path = '/repos/' . $user . '/' . $repo . '/labels' . $label; + $path = '/repos/' . $user . '/' . $repo . '/labels/' . $label; // Build the request data. $data = json_encode( @@ -326,7 +326,7 @@ public function editLabel($user, $repo, $label, $name, $color) $response = $this->client->patch($this->fetchUrl($path), $data); // Validate the response code. - if ($response->code != 201) + if ($response->code != 200) { // Decode the error response and throw an exception. $error = json_decode($response->body);