Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/Github/Api/Issue/Assignees.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public function add($username, $repository, $issue, array $parameters)
throw new MissingArgumentException('assignees');
}

if (!is_array($parameters['assignees'])) {
@trigger_error(sprintf('Passing the "assignees" parameter as a string in "%s" is deprecated and will throw an exception in php-github-api version 3.0. Pass an array of strings instead', __METHOD__), E_USER_DEPRECATED);

$parameters['assignees'] = [$parameters['assignees']];
}

return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/assignees', $parameters);
}

Expand Down