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

Bug #15360 Double error in Christian.php
Submitted: 2008-12-20 02:24 UTC Modified: 2008-12-20 04:27 UTC
From: hmmsjan Assigned: doconnor
Status: Closed Package: Date_Holidays (version 0.20.1)
PHP Version: Irrelevant OS: CentOS 4
Roadmaps: 0.21.0    
Subscription  


 [2008-12-20 02:24 UTC] hmmsjan (Henny Janssen)
Description: ------------ The calculation of the eastern date only works because the call function_exists(easter_days()) has wrong syntax and always returns false. The argument for function_exists should be the name of the function as string. If corrected, the easter_days function gets active, and this function returns a integer number of days after Mar 21 instead of a date object, causing the calling function to fail. What works is (tested with horde 1.2.1): function calcEaster($year) { if (function_exists('easter_days')) { $mar21offset= easter_days($year); $eastern=new Date(sprintf("%04d-03-21",$year)); $eastern->addSeconds($mar21offset*86400); return($eastern); Kind Regards,

Comments

 [2008-12-20 04:27 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. I believe this is fixed in CVS.