Skip to content

Commit

Permalink
Fix Convert data return
Browse files Browse the repository at this point in the history
  • Loading branch information
infiniweb committed Jun 3, 2018
1 parent d22f536 commit 2b4af68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ You will receive the following array:

Array
(
[timestamp] => 1528014248
[rate] => 1.17
[result] => 29.17
[timestamp] => 1516406399
[rate] => 1.222637
[result] => 30.565925
)

2 changes: 1 addition & 1 deletion src/FixerAPI/Convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function get($from, $to, $amount, $date = null)

$response = $this->fixer->getResponse($this->endpointKey, $data);

if (!isset($response->rates)) {
if (!isset($response->result)) {
throw new \Exception("Error Processing Request", 1);
}

Expand Down

0 comments on commit 2b4af68

Please sign in to comment.