|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
stl134 Smarty n00b
Joined: 06 Mar 2007 Posts: 1
|
Posted: Tue Mar 06, 2007 3:32 am Post subject: Problem with date_format ("redeclarate" ?!) |
|
|
In the foreach, i repeat the code
"{$version[$key]->getDate()|date_format:"%d/%m/%Y"}" ...
and i receive the message:
"Fatal error: Cannot redeclare smarty_modifier_date_format() (previously declared in
c:\program files\apache group\Apache\htdocs\lib\Smarty\libs\plugins\modifier.date_format.php:30) in
c:\program files\apache group\Apache\htdocs\lib\Smarty\libs\plugins\modifier.Date_format.php on line 44"
because??! |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Tue Mar 06, 2007 5:52 am Post subject: |
|
|
Are you perchance using multiple instances of the Smarty object? If so -- don't. |
|
Back to top |
|
danilo Smarty Rookie
Joined: 07 Feb 2007 Posts: 33
|
Posted: Wed Mar 07, 2007 5:31 pm Post subject: |
|
|
Why not change the include / require calls to include_once / require_once? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Mar 07, 2007 6:27 pm Post subject: |
|
|
I just looked looked a little more closely at the original post. It is a bit of a PHP quirk.
Seems like there are two different files involved:
- modifier.Date_format.php (custom?); and
- modifier.date_format.php (shipped with Smarty).
Note the differing case. PHP sees these as two different files, even on Windows, so require/include_once can't help. Use only one of date_format or Date_format -- whichever you intend to use -- but not both. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|