Skip to content

Commit

Permalink
Remove unused context parameter from deleteData. Fix rethrowing httpc…
Browse files Browse the repository at this point in the history
…lient Exception.
  • Loading branch information
drsdre committed Apr 19, 2017
1 parent c83813e commit 0ab04b2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,12 @@ public function postData(
* Delete data with entity url
*
* @param string $entity_url
* @param string $context
*
* @return self
*/
public function deleteData(
$entity_url,
$context = 'edit'
$entity_url
) {
// Set context
$data['context'] = $context;

$this->request =
$this->createAuthenticatedRequest()
->setMethod( 'delete' )
Expand Down Expand Up @@ -488,10 +483,7 @@ protected function executeRequest() {
$this->retries ++;
} else {
// Too many retries, retrow Exception
throw new Exception(
'Curl connection error: ' . $e->getMessage(),
Exception::FAIL
);
throw $e;
}

} catch ( Exception $e ) {
Expand Down

0 comments on commit 0ab04b2

Please sign in to comment.