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

Bug #6087 XML_Tree Error with Services_ExchangeRates
Submitted: 2005-11-27 15:12 UTC
From: nohn at php dot net Assigned: cross
Status: Closed Package: Services_ExchangeRates
PHP Version: 5.1.0 OS: Win32
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 : 22 - 2 = ?

 
 [2005-11-27 15:12 UTC] nohn at php dot net
Description: ------------ A XML_Tree error occurs when instantiating a Services_ExchangeRates Object. Test script: --------------- <?php require_once 'Services/ExchangeRates.php'; $ExchangeRate = new Services_ExchangeRates('ECB', 'UN', 'UN', array('cacheDirectory' => '/tmp/', 'cacheLengthRates' => 3600, 'cacheLengthCurrencies' => 3600, 'cacheLengthCountries' => 1600)); ?> Actual result: -------------- Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in c:\wamp\php\PEAR\XML\Tree.php on line 297 PHP Parse error: syntax error, unexpected T_CLONE, expecting T_STRING in c:\wamp\php\PEAR\XML\Tree.php on line 297

Comments

 [2006-01-30 11:44 UTC] akky
I am sure that this is caused by the PHP5 new keyword 'clone'. If you rename all 'clone' functions to something else, e.g. I would use '_clone', it works. This is rather PHP5-related bug in PEAR XML_Tree package. However, XML_Tree page says it is obsolete and use PHP5 built-in XML library. There are some PEAR packages depending on XML_Tree, and the renaming fix does not harm current XML_Tree code (I hope), I propose XML_Tree should be modified for this even though it is out of maintenance. Otherwise, all PEAR packages using XML_Tree need to be revised for PHP5 XML handling, which also make them usable on PHP4.
 [2006-01-30 11:50 UTC] akky
Or, force-install XML_Tree-2.0.0RC2 version will solve the issue as it seems to be using 'cloneTree' instead of 'clone' for function names. As the XML_Tree-2.0.0RC2 is not the stable version, pear install will not upgrade it. To avoid further confusion for users of this package, either - make XML_Tree-2 package official, stable release or - set Services_ExchangeRates dependency over XML_Tree-2.0.0RC2
 [2008-12-28 16:44 UTC] doconnor (Daniel O'Connor)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Fixed, 2.0.0RC2 is minimum now.