Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.0

Bug #1983 Invalid argument supplied for foreach()
Submitted: 2004-07-26 16:20 UTC
From: michael dot klink at no-limits dot net Assigned: cross
Status: Duplicate Package: Services_ExchangeRates
PHP Version: 4.3.6 OS: WIN XP
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 10 + 37 = ?

 
 [2004-07-26 16:20 UTC] michael dot klink at no-limits dot net
Description: ------------ What's this? Warning: Invalid argument supplied for foreach() in c:\apacheserver\apache\htdocs\cmsCommerce\pear\WebServices\ExchangeRates\Rates_ECB.php on line 92 Warning: asort() expects parameter 1 to be array, null given in c:\apacheserver\apache\htdocs\cmsCommerce\pear\WebServices\ExchangeRates.php on line 237 Reproduce code: --------------- $myExchangeRate = new Services_ExchangeRates('ECB', 'UN'); foreach($myExchangeRate -> validCurrencies as $code => $label) { echo "".$code."". $label.""; }

Comments

 [2004-07-26 16:28 UTC] michael dot klink at no-limits dot net
There is no array in Line 89 of Rates_ECB.php $xrates = $root->children[2]->children[0]->children; print_r($xrates); // no result given back
 [2004-10-26 02:45 UTC] powtac at gmx dot de
Im not sure, but did something changed at PEAR:XML_TREE?
 [2005-06-19 00:42 UTC] cross
is this the same as: "Bug #2177 Not obtaining ECB rates or UN Currencies correctly"
 [2005-06-23 07:44 UTC] cross
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.