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)    
Subscription  


 [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

Comments

 [2005-10-02 14:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!