|
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 |
fichtl Smarty n00b
Joined: 11 Aug 2004 Posts: 1
|
Posted: Wed Aug 11, 2004 2:50 pm Post subject: Problem mit Datum unter PHP5 + Lösung |
|
|
Hallo,
ich habe gerade bemerkt das einige Sachen nach einer Umstellung auf PHP5 nicht mehr funktioniert haben. Konkret: Alles was mit Datum oder so zu tun hat (date_format, html_select_date, ...).
Problem: Wenn man einen Timestamp an date_format übergibt wird er von der Funktion smarty_make_timestamp (Datei: shared.make_timestamp.php) noch einmal durch die PHP Funktion strtotime geschickt, was zur Folge hat, das danach ein falscher Timestamp herauskommt.
Hat wohl unter PHP4 noch funktioniert aber jetzt anscheinend nicht mehr.
Ich habs jetzt kurzerhand so gemacht das ich die Funktion smarty_make_timestamp umgeschrieben habe. Wenn dort schon ein Timestamp (is_numeric) ankommt wird er nicht mehr an strtotime weitergeleitet sondern sofort wieder zurückgegeben.
Hat noch niemand dieses Problem gehabt? Ich hab im Forum nichts gefunden.
Schöne Grüße
Michael Feichtinger |
|
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
|