Answer the question
In order to leave comments, you need to log in
Why is there an error in the code (code inside)?
public function oauth($path, array $parameters = [])
{
$response = [];
$this->resetLastResponse();
$this->response->setApiPath($path);
$url = sprintf('%s/%s', self::API_HOST, $path);
$result = $this->oAuthRequest($url, 'POST', $parameters);
if ($this->getLastHttpCode() != 200) {
throw new TwitterOAuthException($result);
}
parse_str($result, $response);
$this->response->setBody($response);
return $response;
Answer the question
In order to leave comments, you need to log in
Check your PHP version. You are using some kind of too museum, you need at least museum 5.4, it is better to use the current 5.6
In this version, apparently, the definition of an array through brackets is not supported.
why are you assigning a value to the parameter?
public function oauth($path, array $parameters = [])
//наверно надо так
public function oauth($path, array $parameters)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question