Rev 16 | Rev 22 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 16 | Rev 21 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | $data = json_decode($cont, true); |
73 | $data = json_decode($cont, true); |
74 | } |
74 | } |
75 | 75 | ||
76 | if ((!isset($data['success'])) || ($data['success'] !== true)) { |
76 | if ((!isset($data['success'])) || ($data['success'] !== true)) { |
77 | if ($raise_exception) { |
77 | if ($raise_exception) { |
78 | if (isset($test_data['error'])) throw new CurrencyLayerException($test_data['error']['code'] . ' : ' . $test_data['error']['info']); |
78 | if (isset($data['error'])) throw new CurrencyLayerException($data['error']['code'] . ' : ' . $data['error']['info']); |
79 | throw new CurCalcException('JSON file '.$this->jsonfile.' does not contain valid request data. Please download it again.'); |
79 | throw new CurCalcException('JSON file '.$this->jsonfile.' does not contain valid request data. Please download it again.'); |
80 | } else { |
80 | } else { |
81 | return false; |
81 | return false; |
82 | } |
82 | } |
83 | } |
83 | } |