Skip to content

Commit

Permalink
Unset project name
Browse files Browse the repository at this point in the history
  • Loading branch information
goncaloasimoes committed Dec 7, 2021
1 parent 355e575 commit 7db81e0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Clients/Service/Localise.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,17 @@ public function import( array $args ) {
throw new Exception( 'Authenticate should be called first' );
}

$url = sprintf( 'import/%s', $args['ext'] );
$body = $args['data'];
unset( $args['ext'], $args['data'] );
$proj_name = $args['__project_name'];
$url = sprintf( 'import/%s', $args['ext'] );
$body = $args['data'];
unset( $args['__project_name'], $args['ext'], $args['data'], );

$url .= empty( $args ) ? '' : '?' . http_build_query( $args );

try {
$res = $this->client->request( 'POST', $url, [ 'body' => $body ] );
} catch ( GuzzleException $e ) {
print( "\nException thrown while uploading for project '{$args['__project_name']}'." );
print( "\nException thrown while uploading for project '{$proj_name}'." );
throw $e;
}

Expand Down

0 comments on commit 7db81e0

Please sign in to comment.