Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Function strftime() is deprecated #780

Closed
krisskals opened this issue Aug 9, 2022 · 6 comments
Closed

ERROR: Function strftime() is deprecated #780

krisskals opened this issue Aug 9, 2022 · 6 comments

Comments

@krisskals
Copy link

I use PHP 8.1 and Smarty 4.2.

I got this error:

ERROR: Function strftime() is deprecated on line 81 in file/vendor/smarty/smarty/libs/plugins/modifier.date_format.php.

@Bozosoft
Copy link

Bozosoft commented Aug 9, 2022

confirmed also by using cmsmadesimple/branches/2.4/ PHP 8.1.8 and Smarty 4.2
Deprecated: Function strftime() is deprecated in /plugins/function.html_select_date.php on line 312

@ophian
Copy link

ophian commented Aug 10, 2022

see PR #781

@Bozosoft
Copy link

Thanks ophian

@fmancardi
Copy link

Hi, I've given a look to the two files with strftime() in the PR

modifier.date_format.php
function.html_select_date.php

IMHO solution can not be changing calls to strftime() to @strftime(), but code need to be re-written using date() or another valid function that will be OK for PHP 8.1.x

regards

@ophian
Copy link

ophian commented Aug 22, 2022

It is total valid to silence deprecation notices up to at least PHP 9, since a valid solution to dateTime does require the intl/icu extension, which isn't the standard nowadays.

@wisskid
Copy link
Member

wisskid commented Sep 9, 2022

Duplicate of #672

@wisskid wisskid marked this as a duplicate of #672 Sep 9, 2022
@wisskid wisskid closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2022
fmancardi pushed a commit to TestLinkOpenSourceTRMS/testlink-code that referenced this issue Aug 17, 2024
I will use @strftime as suggested in smarty
- smarty-php/smarty#678
- smarty-php/smarty#780

A good solution using date() probably requires lot of testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants