Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with Yahoo Provider #8

Closed
robjmills opened this issue Apr 27, 2015 · 2 comments
Closed

Error with Yahoo Provider #8

robjmills opened this issue Apr 27, 2015 · 2 comments

Comments

@robjmills
Copy link

Using sample code:

$httpAdapter = new \Ivory\HttpAdapter\FileGetContentsHttpAdapter();

// Create the Yahoo Finance provider
$yahooProvider = new \Swap\Provider\YahooFinanceProvider($httpAdapter);

// Create Swap with the provider
$swap = new \Swap\Swap($yahooProvider);

$rate = $swap->quote('EUR/USD');

Throws this error:

Catchable fatal error: Argument 2 passed to Swap\Model\Rate::__construct() must be an instance of DateTime, boolean given

@florianv
Copy link
Owner

Hi,

Thanks for reporting this issue. It was due to an issue in the http library we use (see egeloen/ivory-http-adapter#106).

It's now fixed in Swap v2.0.1.

@robjmills
Copy link
Author

Awesome - thanks, that's now working perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants