Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Fixed response code validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Apr 6, 2012
1 parent a218fc6 commit f521e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/joomla/github/issues.php
Expand Up @@ -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(
Expand All @@ -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);
Expand Down

0 comments on commit f521e8f

Please sign in to comment.