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

PHP 8.1 - strftime is deprecated #143

Closed
sharpchi opened this issue Nov 9, 2023 · 2 comments
Closed

PHP 8.1 - strftime is deprecated #143

sharpchi opened this issue Nov 9, 2023 · 2 comments

Comments

@sharpchi
Copy link

sharpchi commented Nov 9, 2023

There are a few lines where strftime is used, but got this exception in testing on PHP8.1

`Scheduled task failed: Ad-hoc database queries: run scheduled reports task (report_customsql\task\run_reports),Unknown error type: Function strftime() is deprecated in /var/www/html/report/customsql/locallib.php on line 611
Backtrace:

  • line 611 of /report/customsql/locallib.php: call to behat_error_handler()
  • line 64 of /report/customsql/classes/task/run_reports.php: call to report_customsql_delete_old_temp_files()
  • line 263 of /lib/cronlib.php: call to report_customsql\task\run_reports->execute()
  • line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
  • line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
  • line 81 of /admin/cron.php: call to cron_run()`

The date() function should be a fairly simple replacement (with format adjustments).

@abias
Copy link

abias commented May 6, 2024

I think this issue was solved by a97a9e5 and could be closed.

@timhunt
Copy link
Member

timhunt commented May 7, 2024

Thanks Alex.

@timhunt timhunt closed this as completed May 7, 2024
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

3 participants