Throwing OAuthException without oauth_consumer_key

This commit is contained in:
victorbjelkholm 2013-09-24 10:34:32 +02:00 committed by Jacob Kiers
parent fdb6c2df49
commit 4011b3674d
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ class Request implements RequestInterface
*/
public function __construct($http_method, $http_url, array $parameters = null)
{
if(!isset($parameters['oauth_consumer_key'])) {
throw new OAuthException('You need a OAuth consumer key to proceed');
}
$parameters = ($parameters) ? $parameters : array();
$this->parameters = array_merge(Util::parseParameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
$this->http_method = $http_method;