Rev 22 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 22 | Rev 23 | ||
---|---|---|---|
Line 112... | Line 112... | ||
112 | $this->check_data_ok($data); |
112 | $this->check_data_ok($data); |
113 | 113 | ||
114 | $exchange_rates_ary = array(); |
114 | $exchange_rates_ary = array(); |
115 | $source = $data['source']; |
115 | $source = $data['source']; |
116 | $quotes = $data['quotes']; |
116 | $quotes = $data['quotes']; |
117 | $quotes['USDUSD'] = 1; // missing 06 Aug 2022. A bug?? Reported https://github.com/apilayer/currencylayer-API/issues/16 |
117 | $quotes[$source.$source] = 1; // "USDUSD" missing 06 Aug 2022. A bug?? Reported https://github.com/apilayer/currencylayer-API/issues/16 |
118 | foreach ($quotes as $n => $v) { |
118 | foreach ($quotes as $n => $v) { |
119 | if ($source == substr($n, 0, 3)) { |
119 | if ($source == substr($n, 0, 3)) { |
120 | $exchange_rates_ary[substr($n, 3, 3)] = $v; // key: USDxxx=12.345 |
120 | $exchange_rates_ary[substr($n, 3, 3)] = $v; // key: USDxxx=12.345 |
121 | } |
121 | } |
122 | } |
122 | } |