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

Bug #3059 Variables defined outside the Date_Span class are not available
Submitted: 2004-12-30 14:53 UTC
From: a dot schilder at gmx dot de Assigned: pajoye
Status: Closed Package: Date
PHP Version: 5.0.0 OS: Windows 2000
Roadmaps: (Not assigned)    

 [2004-12-30 14:53 UTC] a dot schilder at gmx dot de
Description: ------------ We're using the __autoload function to load the date classes when needed. The __autoload functions uses an autoload class to include the required files. Above the Date_Span class two varaibles are defined without using the $GLOBALS array - these variables are not available when the class is autoloaded (Notice: Undefined index: _DATE_SPAN_INPUT_FORMAT in [...]\Date\Span.php on line 243). Simply use $GLOBALS['_DATE_SPAN_FORMAT'] = '%C'; ... $GLOBALS['_DATE_SPAN_INPUT_FORMAT'] = DATE_SPAN_INPUT_FORMAT_NNSV; (as in the other files) instead of $_DATE_SPAN_FORMAT = '%C'; ... $_DATE_SPAN_INPUT_FORMAT = DATE_SPAN_INPUT_FORMAT_NNSV; and all is fine;) Bye, Achim


 [2005-10-02 14:50 UTC] pajoye
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the 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.