smarty icon indicating copy to clipboard operation
smarty copied to clipboard

Since PHP 5.5.22 date_format error: Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in

Open jsonjuri opened this issue 11 years ago • 3 comments

Hi, Since i upgraded from PHP 5 to 5.5.22, after that the date format modifier doesn't work anymore. I read on the smarty forum: http://www.smarty.net/forums/viewtopic.php?p=40290 that since 5.2: http://www.php.net/manual/en/function.date-format.php maybe cause a conflict?

input date: 2015-09-01 {$request.vessel_departure|date_format:"%d-%m-%Y"}

Warning: date_format() expects parameter 1 to be DateTimeInterface, string given in myurl/cache/compile/9d33c5b66c20f76243eb6af5d7fe2b244a6b3446.file.dropdown.tpl.php on line 69

Template structure:

jsonjuri avatar Sep 07 '15 07:09 jsonjuri

If you don't set the plugin directory properly you will have this error, now its solved :)

jsonjuri avatar Sep 07 '15 13:09 jsonjuri

what is your method to fix this issue?

luduoxin avatar Aug 24 '16 14:08 luduoxin

What i remember is check if the plugin directory set to the right path.

jsonjuri avatar Aug 24 '16 15:08 jsonjuri