Skip to content

Commit

Permalink
fix same currency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JRSaunders committed Aug 31, 2017
1 parent 6dcd2a0 commit c22a282
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ public function __construct($fromCurrency, $toCurrency, $value, $ttl = 86400, $a

protected function init($fromCurrency, $toCurrency, $value, $ttl = 86400, $old = false)
{
if($fromCurrency==$toCurrency){
$this->rate = 1;
$this->value = $value;
return;
}
$this->cache = new Cache();
$cacheFilename = $fromCurrency . $toCurrency . '-divaratedata';
if ($old) {
Expand Down

0 comments on commit c22a282

Please sign in to comment.